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
KiRa [710]
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. Write some code that uses a while statement to print on a line by itself, each of the years from FIRST_YEAR to LAST_YEAR inclusive. On each line, after the year, separated by a colon and a space, print the new value amount of oil, taking into account that each year the oil consumed increases by 20%.
Computers and Technology
1 answer:
Kitty [74]3 years ago
5 0

// While loop

while(FIRST_YEAR < LAST_YEAR)

{

cour<<"Year : " << First_YEAR << " Oil consumed is : " << oil <<"."<<endl;

FIRST_YEAR+=1;

// calculate the 20% increase

oil = oil + (oil *.20)

}

You might be interested in
Select the correct answer.
ella [17]

Answer:

Python

Explanation:

8 0
3 years ago
Which of the following statements is true regarding how Wireshark works? a. Where packets are captured and how they are captured
I am Lyosha [343]

Answer:

b. By running the Wireshark software on the same computer that generates the packets, the capture is specific to that machine.

Explanation:

By running the Wireshark software on the same computer that generates the packets, the capture is specific to that machine. is true regarding how Wireshark works.

4 0
3 years ago
What are some cowboy ethics??
lys-0071 [83]

Answer:

giv meh a min plsssss

Explanation:

4 0
3 years ago
What is the definition of assiduous?
LuckyWell [14K]

Answer:

showing great care and perseverance.

6 0
3 years ago
Read 2 more answers
Given a 13 bit address bus, how many unique addressed could be accessed? g
valina [46]
2^13 = 8192 addresses
8 0
4 years ago
Other questions:
  • Lena has secured her online website, which sells fashion apparel. She has taken all the necessary steps by making her website PS
    8·1 answer
  • If you are planning to carry a large balance on your credit card, which of the following credit card features should you look fo
    7·2 answers
  • After brainstorming engineers may refine their ideas by making
    8·1 answer
  • Differences between iphone 6 and 6s
    6·1 answer
  • The Maui coffee shop sells coffee at $10.50 a pound plus the cost of shipping. Each order ships for $0.86 per pound + $1.50 fixe
    14·1 answer
  • What are some of these new iPad extras? One is the iMarker. Crayola teamed up with another company to make it. It costs $29.99.
    8·1 answer
  • Name 3 supercomputers along with their cost, purpose and the country it is located.​
    15·1 answer
  • How do you select a single cell, a single column, a single
    10·1 answer
  • Code a program that gets all possible solutions of a string using 3 for loops. Actual question attached
    11·1 answer
  • What action should you take if you become aware that sensitive compartmented information has been compromised
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!