Skip to content

Commit

Permalink
again commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sabya48 authored Jan 7, 2020
1 parent 5e7bcd6 commit c70578b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions fahrenheit temp con.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include<bits/stdc++.h>
using namespace std;
int main()
{
int choice;
float temp,countemp;
cout<<"Temperature conversion Menu"<<endl;
cout<<"1. Fahrenheit to celsius"<<endl;
cout<<"2. celsius to fahrenheit"<<endl;
cout<<"Enter your choice"<<endl;
cin>>choice;
if(choice==1)
{
cout<<"Enter the temperature in Fahrenheit"<<endl;
cin>>temp;
countemp=(temp-32)/18;
cout<<"The temperature in celsius is: "<<countemp<<endl;
}
else
{
cout<<"Enter the Temperature in centrigrade"<<endl;
cin>>temp;
countemp=1.8*temp+32;
cout<<"The temperature in Fahrenheit is: "<<countemp<<endl;

}
return 0;
}

0 comments on commit c70578b

Please sign in to comment.