Programming Chunks
In My Words
Showing posts with label
program that converts celsiuis to fahrenheit
.
Show all posts
Showing posts with label
program that converts celsiuis to fahrenheit
.
Show all posts
Tuesday, March 15, 2011
Program that takes input in Celsius and converts to fahrenheit
This is a beginner program which prompts user to input temperature in Celsius and outputs the temperature in Fahrenheit.
#include
using namespace std;
void main()
{
float fahrenheit=0.0, celsius=0.0;
cout<<"Enter Teperature in Celsius: "; cin>>celsius;
fahrenheit = ((celsius + 32)*9)/5;
cout<<"\nIn Fahrenheit: "<< fahrenheit;
}
Older Posts
Home
Subscribe to:
Posts (Atom)