Kamis, 06 Maret 2014

Program Temperatur dengan IF-ELSE

Program Temperatur dengan IF-ELSE

#include <stdio.h>
#include <conio.h>
main ()
{
clrscr();
float temperatur;
printf("Masukkan temperatur dalam celcius= ");
scanf("%f",&temperatur);
if (temperatur<=0)
{
printf("wujud air beku");
}
else if (temperatur>=0&&temperatur<=100)
{
printf("wujud air cair");
}
else if (temperatur>=100)
{
printf("wujud air gas");
}

getch();
return 0;
}

Hasil Eksekusi :



Selamat Mencoba !!!

0 comments:

Posting Komentar