C program to print water states(ice,water or steam) with temperaturelevel.

#include<stdio.h>
#include<conio.h>
void main() {
float temp;
clrscr();
printf("Enter Temperature in Celsius\n");
scanf("%f",&temp);
if (temp<=0) 
printf("ICE\n");
else {
if (temp<100) 
printf("WATER\n");
else 
printf("STEAM\n");
}
getch();
}

No comments:

Post a Comment