1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yawa3891 [41]
3 years ago
9

Assume that two int constants,FIRST_YEAR and LAST_YEAR have already been declared and initialized with year values (like 2009, 2

014), along with a double variable oil that has been initialized with the number of barrels of oil consumed in Canada in the year given by FIRST_YEAR.
Computers and Technology
1 answer:
levacccp [35]3 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

int count;

double oil=10.88;

int FIRST_YEAR=2009,LAST_YEAR=2014;

count = FIRST_YEAR;

do

{

cout << count << ": " << oil << endl;

oil *= 1.20;

count++;

} while ( count <= LAST_YEAR );

return 0;

}

Explanation:

  • Declare the required variables.
  • Use a do-while loop that runs from first year to last year .
  • Display count of oil .
  • Increment oil by 20%  and count by 1.
You might be interested in
Identify what a computer needs to
sergejj [24]
Digital sound because you want be able to hear
6 0
3 years ago
Identifying Characters
alina1380 [7]
The answer is d I just took the test
5 0
3 years ago
Read 2 more answers
Joe is examining the logs for his web server and discovers that a user sent input to a web application that contained the string
alexira [117]
SQL Injection Attack
6 0
2 years ago
Why does a layer 3 device perform the anding process on a destination ip address and subnet mask?
mafiozo [28]
To get the network number and node number of the destination machine. The subnet mask is usually called the NETwork MASK, so anding it with the address gives you the network number. Using the not logical operator on the netmask then protects the node bits in a second and operation.

address & netmask = network number
address & not( netmask ) = node number

The not operator essentially just flips the bits of it's argument.
8 0
3 years ago
IblMessage.txt=welcome to fiji.what is the error in the coding and what type of error is it?(explain)​
spin [16.1K]

Answer:

The correct syntax (assuming WinForms) is

lblMessage.Text = "Welcome to fiji";

The given statement fails to follow the syntax of literal strings, which should be in quotation marks. (depending on the framework and programming language, the txt property may also be incorrect, as well as the missing semi-colon).

8 0
4 years ago
Other questions:
  • Which type of address is used in a packet to address the packet to a single host??
    12·1 answer
  • A program executes 100 billion instructions. It executes on an IBM processor that has an average CPI of 1.2 and a clock frequenc
    15·1 answer
  • (Bible)<br> Sin may be an inward thought or an outward act. True False
    11·2 answers
  • The variables xp and yp have both been declared as pointers to integers, and have been assigned values. Write the code to exchan
    6·1 answer
  • A drink costs 2 dollars. A taco costs 5 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 2 dri
    11·1 answer
  • Explain briefly what would happen if marketing research is not conducted before a product is developed and produced for sale.
    14·1 answer
  • Creative Commons material often costs money to use.<br><br> True<br> False
    9·2 answers
  • Finding values in an array
    5·1 answer
  • List 10 ways how can graphic design help the community
    13·1 answer
  • True or False: VLANs in cloud computing are most likely to be found on direct connections with a CSP.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!