write a function to print hot or cold weather depending on the users enter in C

 // write a function to print hot or cold weather depending on the users enter

#include <stdio.h>

void main()

{

int temperature;

printf("Input days temperature: ");

scanf("%d", &temperature);

if(temperature<0)

printf("Freezing weather.\n");

else if(temperature<20)

printf("Very cold weather.\n");

else if(temperature<30)

printf("cold weather.\n");

else 

printf("its very hot.\n");

}

Comments

Popular posts from this blog

Automations and robotics

Palindrome Pattern Program In Java Language

Rhombus Pattern Program In Java Language