Temperature Conversion
#include <iostream.h>
#include <conio.h>
void main(){
float a,b,temperature;
cout<<"konfersi suhu";
cout<<"\n\n select 1 if of celcius to reamur";
cout<<"\n select 2 if of celcius to farenhait";
cout<<"\n select3 if of reamur to farenhait";
cout<<"\n select 4 if of reamur to celcius";
cout<<"\n select 5 if of farenhait to celcius";
cout<<"\n select 6 if of farenhait to reamur";
cout<<"\n\n input selection="; cin>>a;
cout<<"\n\n temperature input="; cin>>temperature;
if (a==1)
b=(4*temperature)/5;
else if (a==2)
b=((9*temperature)/5)+32;
else if (a==3)
b=((9*temperature)/4)+32;
else if (a==4)
b=(5*temperature)/4;
else if (a==5)
b=(5*(suhu-32))/9;
else if (a==6)
b=(4*(suhu-32))/9;
else
cout<<"\n sorry you must enter a number between 1 - 6";
cout<<"\n result ="<<b;
getch();
}
good luck with my friends :)
Tidak ada komentar:
Posting Komentar