C++ Program that converts Celsius to Fahrenheit and Fahrenheit to Celsius by taking input and print them.
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int c,Cel,f,Fah;
cout<<"Enter temperature in celsius: ";
cin>>c;
Fah=c+32;
cout<<endl<<"In Fahrenheit is: "<<Fah<<endl;
cout<<endl<<"Enter temperature in Fahrenheit: ";
cin>>f;
Cel=f-32;
cout<<endl<<"In Celsius is "<<Cel;
getch();
return 0;
}
You can also search this topic by:
How to write a program in C++ which converts Celsius to Fahrenheit and Fahrenheit to Celsius through taking input from user and print them.
No comments:
Post a Comment