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
kotykmax [81]
3 years ago
11

This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three dou

ble values. The first values are starting and ending temperatures. The third value is the increment value. There is no prompt for the input. There is an error message that can be displayed. This is discussed later. You need to display output for all of the values between the starting and ending values. First two values are temperatures in Fahrenheit. You need to display all of the values from the first temperature to the last temperature. You increment from one temperature to the next by the increment value (the third value you read in). You need to convert these temperatures to Celsius and Kelvin. You need to output the temperatures as Fahrenheit, Celsius, and Kelvin. The numbers should be 18 characters wide with 4 digits of precision and need to be in fixed format. Do not use tab characters (\t) to output the values. The headings are also required (see the sample output below). The conversion from Fahrenheit to Celsius is:

Computers and Technology
1 answer:
Naily [24]3 years ago
8 0

Answer:

see explaination

Explanation:

#include<iostream>

#include<iomanip>

using namespace std;

int main()

{

double temp1,temp2,inc,cel;

int i=1;

while(i==1)

{

i=0;

cin>>temp1>>temp2>>inc;

if(temp2<temp1||inc<=0)

{

i=1;

cout<<"Starting temperature must be <= ending temperature and increment must be >0.0\n";

}

}

cout<<endl;

cout<<setw(15)<<"Fahrenheit"<<setw(15)<<"Celsius";

while(temp1<=temp2)

{

cel=(temp1-32)/1.8;

cout<<endl;

cout<<fixed<<setprecision(3)<<setw(15)<<temp1<<setw(15)<<cel;

temp1+=inc;

}

}

Please kindly check attachment for output.

You might be interested in
Consider the expression 3 * 2 ^ 2 &lt; 16 5 AndAlso 100 / 10 * 2 &gt; 15 - 3. Which operation is performed second?
miss Akunina [59]

Answer:

In the first expression

3 * 4 will be performed second.

In the second expression

10* 2  will be performed second.

Explanation:

In many programming language, there is an operator precedence where the operator (e.g. +, - , * , / etc) will be executed following a specific order. For example, the operator ^ which denotes power will always be executed prior to * or /    and if / and * exist in the same expression, the operator positioned at the left will be executed first.

Hence, in the expression 3*2^2 < 16 , 2 will be powered to 2 (2^2) first and then only multiplied with 3.

In the expression 100 / 10 * 2 > 15 - 3,  100 will be divided by 10 and then only multiplied with 2.

7 0
4 years ago
Consider the following code segment. int[][] arr = {{3, 2, 1}, {4, 3, 5}}; for (int row = 0; row &lt; arr.length; row++) { for (
ludmilkaskok [199]

Answer:

Condition one - 1 time

Condition two - 2 times

Explanation:

Given

The above code segment

Required

Determine the number of times each print statement is executed

For condition one:

The if condition required to print the statement is:  <em>if (arr[row][col] >= arr[row][col - 1]) </em>

<em />

For the given data array, this condition is true only once, when

row = 1  and  col = 2

i.e.

<em>if(arr[row][col] >= arr[row][col - 1]) </em>

=> <em>arr[1][2] >= arr[1][2 - 1]</em>

=> <em>arr[1][2] >= arr[1][1]</em>

<em>=> 5 >= 3 ---- True</em>

<em />

The statement is false for other elements of the array

Hence, Condition one is printed once

<em />

<em />

For condition two:

The if condition required to print the statement is:  <em>if (arr[row][col] % 2 == 0) </em>

<em />

The condition checks if the array element is divisible by 2.

For the given data array, this condition is true only two times, when

row = 0  and  col = 1

row = 1  and  col = 0

i.e.

<em>if (arr[row][col] % 2 == 0) </em>

<em>When </em>row = 0  and  col = 1

<em>=>arr[0][1] % 2 == 0</em>

<em>=>2 % 2 == 0 --- True</em>

<em />

<em>When </em>row = 1  and  col = 0

<em>=>arr[1][0] % 2 == 0</em>

<em>=> 4 % 2 == 0 --- True</em>

<em />

<em />

The statement is false for other elements of the array

Hence, Condition two is printed twice

3 0
3 years ago
Why are people's visions of utopias and dystopias subjective?
Leno4ka [110]

Answer:

D. Because the technology needed for one person's utopia may be what creates disaster for another person's dystopia.

Explanation:

3 0
3 years ago
How do you put sound/music in Google classroom slideshow?
Svet_ta [14]
So, there's no actual way to insert music into your slides unless you use imovie. BUT, you can place a link in one of your slides to a particular song on spotify, and as you are presenting, you can click on the link, and it will open up spotify and play the song you selected. 

Okay so first, go ahead and open up your google slides presentation. 

Then find the specific slides you want to add music to. 

Select Insert from the menu, and then click on text box. Place the text box anywhere in your slide, and you can put some text in there to disguise the link, or you can just paste the link directly. 

TO GET THE LINK: 

Go to spotify.com 
Pick out the song you want to use.
Right click, and select "copy song link" 

Then paste that link in your text box you created! 
6 0
3 years ago
.............................................is the vertical distance between successive lines of the text​
vladimir1956 [14]

Answer:

Line spacing is the vertical distance between successive lines of the text​.

Explanation:

Hope this helps you. :)

8 0
3 years ago
Other questions:
  • _ are typically comprised of a mix of _ and _
    11·2 answers
  • Suppose in a class of 100 students, there is a homework due every week. The professor wants to encourage students to hand in the
    8·1 answer
  • What technical elements can a film director manipulate to achieve the final product, conveying his ideology and vision?
    11·1 answer
  • What is the answer to this question on the thing I'm doing in apex
    6·1 answer
  • What is VoIP?
    5·1 answer
  • 30 POINTS! PLEASE ANSWER QUICK!!!
    12·1 answer
  • write a Program which displays at least 5 different sentences that explain how technology has been used to win souls to Christ.
    6·1 answer
  • How do myths impact today’s society.(A
    14·2 answers
  • A reflective cross-site scripting attack (like the one in this lab) is a __________ attack in which all input shows output on th
    14·1 answer
  • which of the following is a scenario in which an it support technician would most likely be required to implement the alternate
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!