Minggu, 28 Juni 2015

Wujud Air

Program Wujud Air dengan DEV C++

#include <iostream>
#include <cstdlib>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {

float A;

cout<<"Masukkan suhu air dalam Celcius = ";cin>>A;

if ((A>=0) && (A<=100))
cout<<"Wujudnya cair";
else if (A>100)
cout<<"Wujudnya uap";
else
cout<<"Wujudnya padat";

cout<<endl;
system("PAUSE");
return 0;
}


Tidak ada komentar:

Posting Komentar