Sabtu, 06 Oktober 2012

Program Konversi Suhu C++

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<math.h>


void main()
{
int cel, fah, rea, kel;


cout << "=============================" << endl;
cout << "KONVERSI SUHU DARI CELCIUS KE" << endl;
cout << " Fahrenheit: Reamur: Kelvin" << endl;
cout << "=============================" << endl;
cout<< "Masukkan suhu dalam Celcius : ";
cin>>cel;
                                               
cout << "=============================" << endl;
cout << "HASIL KONVERSI SUHU" << endl;
cout << "=============================" << endl;

cout << " fahrenheit : " << (((9.0/5.0)*cel) + 32)<<endl;
cout << " reamur     : " << ((4.0/5.0)*cel)<<endl;
cout << " kelvin     : " << (cel + 273)<<endl;


getche();
}

Tidak ada komentar:

Posting Komentar