Menghitung Suhu menggunakan Fungsi Dengan C++

#include<iostream.h>
#include<conio.h>
float tampilan_nilai_R()
{
float C,R,F;

cout<<“\n Masukan Nilai C   :” ;cin>>C;
R=0.8*C;
return R;
}
float tampilan_nilai_F()
{
float F,C;
F=1.8*(C+32);
return F;
}
main()
{
float n,X;

n = tampilan_nilai_R();
X = tampilan_nilai_F();
cout<<“\n Pemanggilan suhu R : “<<n<<“\t reamur”;endl;
cout<<“\n Pemanggilan suhu F :”<<X<<“\t farenheit”;endl;
}

Screen Shotnya :

Semoga bermanfaat ^_^

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s