Question
Question 2
Write a program to generate a table of conversions from Fahrenheit to Celsius for values from 0 degrees F to 100 degrees F. P
0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts,please give me comment...

1)

#include<iostream>

using namespace std;

int main(){

double F=0, C;

cout<<"F C"<<endl;

while(F<=100){

C = (F-32)*5/9.0;

cout<<F<<" "<<C<<endl;

F+=5;

}

return 0;

}

2)

#include <iostream>

using namespace std;

int main()

{

double F = 0, C, inc;

cout << "Increment value between lines: ";

cin >> inc;

cout << "F K" << endl;

do

{

C = (F + 459.67) * 5 / 9.0;

cout << F << " " << C << endl;

F += inc;

}while (F <= 200);

return 0;

}

nagaraju@nagaraju-Vostro-3550:~/Desktop/CHEGG/2019/February/19022018$ g++ conversions.cpp nagaraju@nagaraju-Vostro-3550: /Des

Add a comment
Know the answer?
Add Answer to:
Question 2 Write a program to generate a table of conversions from Fahrenheit to Celsius for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • write in C code 23. Write a program to generate a table of conversions from Celsius...

    write in C code 23. Write a program to generate a table of conversions from Celsius to Rankin. Allow the user to enter the starting temperature and increment between lines. Print 25 lines in the table. Use a for loop in your solution. Write the data from the table to save in a .txt file.

  • Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin...

    Temperature Converter Create a temperature conversion program that will convert the following to Fahrenheit: Celsius Kelvin Newton Your program should take a character which represents the temperature to convert from and a value to be converted to using the following specification: C - Celsius K - Kelvin N - Newton In addition your program should take in the following character to exit the program: X - eXit the program The numeric input for your program should be of type double....

  • General overview This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin....

    General overview This program will convert a set of temperatures from Fahrenheit to Celsius and Kelvin. Your program will be reading in three double 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...

  • Convert Celsius to Fahrenheit. (Programming Exercise 2.1) or Convert Fahrenheit to Celsius. Write a program with...

    Convert Celsius to Fahrenheit. (Programming Exercise 2.1) or Convert Fahrenheit to Celsius. Write a program with reads a Celsius degree value from the console or a Fahrenheit degree value from the console , then converts it to Fahrenheit or Celsius and displays the result. The formulas for the conversion are as follows: Fahrenheit = (9 / 5) * Celsius + 32 Celsius = (5/9) *(Fahrenheit -32) Write this program in Java please

  • Write a program that displays a table of Celsius temperatures 0 through a number entered by...

    Write a program that displays a table of Celsius temperatures 0 through a number entered by the user and their Fahrenheit equivalents as in the figure below. The formula for converting a Celsius temperature to a Fahrenheit temperature is: F = 9 / 5 * C + 32 where F is the Fahrenheit temperature and C is the Celsius Temperature. Your program must use a 'for' loop. Display all temperatures to one decimal place. Write a program that displays a...

  • write a python program that use while and for loop.

    Write a Python program that- Uses a while loop to produce a table that shows the conversion of degrees Celsius to degrees Fahrenheit between 0 degrees Celsius and 100 degrees Celsius. Theconversion formula is Fahrenheit = Celsius * 9 / 5 + 32-Uses a for loop to produce a table that shows the conversion of degrees Fahrenheit to degrees Celsius between 0 degrees Fahrenheit and 100 degrees Fahrenheit. Theconversion formula is Centigrade = (Fahrenheit – 32) * 5/9.-Each conversion table...

  • C++ Code needed    Celsius Temperature Table The formula for converting a temperature from Fahrenheit to...

    C++ Code needed    Celsius Temperature Table The formula for converting a temperature from Fahrenheit to Celsius is C =5/9(F -32) where F is the Fahrenheit temperature and C is the Celsius temperature. Write a function named celsius that accepts a Fahrenheit temperature as an argument. The function should return the temperature, converted to Celsius. Demonstrate the function by calling it in a loop that displays a table of the Fahrenheit temperatures 0 through 20 and their Celsius equivalents.

  • please solve it using c++ coding Write a C++ program that outputs a table having four...

    please solve it using c++ coding Write a C++ program that outputs a table having four columns of temperature values, ordered as follow: Celsius, Fahrenheit, Kelvin and Rankine. Use a while loop Let the Celsius temperature vary from 0.0 to 100.0 in steps of 5 °C. Convert each of these values to the other scales using the formulas given in Lab-1 (reproduced here for your convenience): 1) KELVIN CELSIUS FAHRENHEIT RAN KINE 31SOLS 2672 273 MELTS 32 a. Fahrenheit (F):...

  • Write a C++ console application that displays a table of Celsius temperatures from 0 through 20...

    Write a C++ console application that displays a table of Celsius temperatures from 0 through 20 and their equivalent Fahrenheit temperature values. The formula for converting from Celsius to Fahrenheit is: [In C++ Please] F==C + 32 Where, C is the temperature value in Celsius, and F is the equivalent temperature in Fahrenheit. Your program must use a loop to display the temperature values.

  • 8.) Write a C++ program to convert temperature in degrees Fahrenheit to degrees Celsius. This is...

    8.) Write a C++ program to convert temperature in degrees Fahrenheit to degrees Celsius. This is the equation for this conversion: Celsius = 5.0/9.0 (Fahrenheit-32.0) Have your program convert and display the Celsius temperature corresponding to 98.6 degrees Fahrenheit. Your program should produce the following display (replacing the underlines with the correct values): For a Fahrenheit temperature of-_ degrees, the equivalent Celsius temperature is degrees

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT