Laman

Powered By Blogger

Sabtu, 28 April 2012

Konversi Suhu : Celcius-Fahrenheit-Reamur-Kelvin

Program konversi suhu menggunakan C++ :


#include <iostream>
#include <string>


using namespace std;
int main()
{
   float k,K;
   float r,R;
   float c,C;
   float f,F;


   cout<<"Masukkan Nilai Celcius = ";
   cin >> C;
   F =(C*1.8)+32;
   R =C*0.8;
   K =C+273.15;
   cout << "Fahrenheit ="<<F << endl;   cout << "Reaumur ="<<R << endl;   cout << "kelvin ="<<K << endl;
 
   system("pause");
   return 0;
}

Tidak ada komentar:

Posting Komentar