kali ini saya ingin memberikan tahap tahap dalam membuat program konversi suhu menggunakan dev c ++
Nama :yogi anggara
Nim :1500018073
ini adalah langkah langkah koding yang harus di lakukan
#include<cstdlib>
#include <iostream>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
float cl,re,fh,kl;
cout<<"================celcius====================";cout<<""<<endl;
cout<<"Masukan nilai celcius= ";cin>>cl;
kl=cl+273;
cout<<"kelvin= "<<kl<<endl;
re=cl*0.8;
cout<<"reamur= "<<re<<endl;
fh=(cl*1.8)+32;
cout<<"fahrenheit= "<<fh<<endl;
cout<<"=================kelvin====================";cout<<""<<endl;
cout<<"masukan kelvin=";cin>>kl;
cl=kl-273;
cout<<"celcius= "<<cl<<endl;
fh=kl*1.8-459.67;
cout<<"fahrenheit="<<fh<<endl;
cout<<"=================reamur=====================";cout<<""<<endl;
cout<<"masukan nilai reamur= ";cin>>re;
kl=re/0.8+32;
cout<<"kelvin= "<<kl<<endl;
fh=re*2.25+32;
cout<<"fahrenheit= "<<fh<<endl;
cout<<"=================fahrenheit==================";cout<<""<<endl;
cout<<"masukan fahrenheit=";cin>>fh;
cl=(fh-32)/1.8;
cout<<"celcius= "<<cl<<endl;
kl=(fh-32)/1.8+273;
cout<<"kelvin= "<<kl<<endl;
re=(fh-32)/2.25;
cout<<"reamur= "<<re<<endl;
return 0;
}

0 ulasan