hitung konversi temperatur dari celcius ke fahrenheit, reamur, dan kelvi

#include <cstdlib>

#include <iostream>

#include<math.h>

using namespace std;

int main()

{

char ulang;

double fahrenheit,celcius,reamur,kelvin ;

cout<<“====== Program perhitungan Konversi suhu ke Fahrenheit, Reamur dan Kelvin ====== “<<endl;

cout<<“===================================================================”<<endl;

do

{

cout<< “Silahkan masukkan suhu Celcius : “;

cin>>celcius;

fahrenheit = celcius * 1.8+32;

reamur = celcius * 0.8;

kelvin = celcius + 273;

cout<< “Konversi suhu dalam Fahrenheit adalah : ” << fahrenheit;

cout<<endl ;

cout<< “Konversi suhu dalam Reamur adalah : ” << reamur ;

cout <<endl ;

cout<< “Konversi suhu dalam Kelvin adalah : “;

cout<<kelvin ;

cout<<endl;

cout<<“===========================================================”<<endl;

cout<<“Ulangi penghitungan Konversi suhu ke Fahrenheit, Reamur dan Kelvin <y/t> ? “;

cin>>ulang;

} while(ulang==’y’);

return 0;

}

konversi_suhu

This entry was posted in Algoritma Pemrograman & Elemen Dasar C++ and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *