#include<iostream>
using namespace std;
int main()
{
int c;
float celcius,farenheit;
cout<<"From farenheit to celcius press 1 \n celcius to fahrenheit press2"<<"\n\n";
cin>>c;
switch(c)
{
case 1:
cout<<"enter temp in Fahrenheit\n";
cin>>celcius;
farenheit =5.0/9.0*(celcius-32);
cout<<farenheit<<endl;
break;
case 2:
cout<<"enter temp in Celcius\n";
cin>> farenheit;
celcius=9.0/5.0*fer+32;
cout<<celcius<<endl;
break;
}
system("pause");
return 0;
}
Bookmarks