Write a program that will display "IT'S COLD!" if the temperature is less than 20, "IT'S HOT!" if the temperature is greater than 30, "COOL CLIMATE!" otherwise.
#include<stdio.h>
#include<conio.h>
#define min printf
#define jee scanf
int main()
{
int temp;
min("Enter temperature: ");
jee("%d",&temp);
if ( temp < 20 )
{
min("IT'S COLD!");
}
else
if ( temp > 30 )
{
min("IT'S HOT!");
}
else
{
min("COOL CLIMATE!");
}
getch ();
return 0;
}
Sample Outputs:
▌▌▌Ü ▌▌▌
Walang komento:
Mag-post ng isang Komento