Assignment: This is an individual assignment. Design, write, compile, run and te
ID: 2247637 • Letter: A
Question
Assignment: This is an individual assignment. Design, write, compile, run and test a C++ program that computes a Celsius temperature given the Fahrenheit temperature using the formula: Celsius = (Fahrenheit-32.0) * 0.555555 where 32.0 is the Fahrenheit temperature when Celsius is zero and 0.555555 is the degree factor. Input: The program prompts the user for a Fahrenheit temperature. "Prompts" means that the program informs the user what is to be inputted into the program. Make sure that you communicate clearly and effectively. For example, "Enter number: " would not indicate the input clearly according to this assignment. Output: The program prints the appropriate Celsius temperature with appropriate information messages.Explanation / Answer
#include<iostream.h>
#include<conio.h>
void main()
{
float cel, far;
clrscr();
cout<<"Enter temperature in Fahrenheit: ";
cin>>far;
cel = (far - 32) * 5/9;
cout<<"Temperature in Celsius: "<<cel;
getch();
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.