Menghitung suhu celcius, reamur, kelvin dan fahreinhet

Pada pertemuan ini, akan dibahas mengenai cara menghitung suhu dengan diketahui suhu celciusnya berbeda2.

1. dik: c=100;

dit: r, k, dan f?????????

#include<iostream>
using namespace std;

int main()

{

float c;

float R;

float k;

float f;

c=100;

k=c+273;

R=(c*0.8);

f=(c*1.8)+32;

cout <<k<<endl;

cout <<R<<endl;

cout <<f<<endl;

return 0;

}v12

2. dik: c=130;

     dit: r, k, dan f?????????

   

#include<iostream>
using namespace std;

int main()

{

float c;

float R;

float k;

float f;

c=130;

k=c+273;

R=(c*0.8);

f=(c*1.8)+32;

cout <<k<<endl;

cout <<R<<endl;

cout <<f<<endl;

return 0;

}

 

v21

 

3. dik: c=160;

     dit: r, k, dan f?????????

   

#include<iostream>
using namespace std;

int main()

{

float c;

float R;

float k;

float f;

c=160;

k=c+273;

R=(c*0.8);

f=(c*1.8)+32;

cout <<k<<endl;

cout <<R<<endl;

cout <<f<<endl;

return 0;

}

 

 

4. dik: c=70;

     dit: r, k, dan f?????????

    

#include<iostream>
using namespace std;

int main()

{

float c;

float R;

float k;

float f;

c=70;

k=c+273;

R=(c*0.8);

f=(c*1.8)+32;

cout <<k<<endl;

cout <<R<<endl;

cout <<f<<endl;

return 0;

}

 

5. dik: c=70;

     dit: r, k, dan f?????????

#include<iostream>using namespace std;
int main()

{

float c;

float R;

float k;

float f;

c=20;

k=c+273;

R=(c*0.8);

f=(c*1.8)+32;

cout <<k<<endl;

cout <<R<<endl;

cout <<f<<endl;

return 0;

}

 

 

 

6. # include <iostream>

using namespace std;

int main ()

{

float C[4];

float R[4];

float F[4];

float K[4];

C[0]=100;

C[1]=130;

C[2]=160;

C[3]=70;

C[4]=20;

R[0]=C[0]*0.8;

R[1]=C[1]*0.8;

R[2]=C[2]*0.8;

R[3]=C[3]*0.8;

R[4]=C[4]*0.8;

F[0]=(C[0]*1.8)+32;

F[1]=(C[1]*1.8)+32;

F[2]=(C[2]*1.8)+32;

F[3]=(C[3]*1.8)+32;

F[4]=(C[4]*1.8)+32;

K[0]=C[0]+273;

K[1]=C[1]+273;

K[2]=C[2]+273;

K[3]=C[3]+273;

K[4]=C[4]+273;

cout<<R[0]<<endl;

cout<<R[1]<<endl;

cout<<R[2]<<endl;

cout<<R[3]<<endl;

cout<<R[4]<<endl;

cout<<F[0]<<endl;

cout<<F[1]<<endl;

cout<<F[2]<<endl;

cout<<F[3]<<endl;

cout<<F[4]<<endl;

cout<<K[0]<<endl;

cout<<K[1]<<endl;

cout<<K[2]<<endl;

cout<<K[3]<<endl;

cout<<K[4]<<endl;

return 0;

}

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: