Contoh program c++ tentang suhu

Minggu, 20 November 20110 komentar


#include <iostream.h>
#include <conio.h>
main()
{
float suhu;

cout<<"masukkan besarnya suhu : ";
cin>>suhu;

//melakukan pengecekan terhadap suhu

if(suhu<0)
cout<<"air akan berwujud  :"<<"padat (es)"<<endl;
else
if((suhu>0)&&(suhu<100))
cout<<"air akan berwujud  :"<<"cair"<<endl;
else
cout<<"air akan berwujud  :"<<"gas"<<endl;

getch();
}

Share this article :

Posting Komentar

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Wahana InformasiKu - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger