C program that check if a number is Bigger than 100
Posted by Samath
Last Updated: November 09, 2014
  3313

Write a C program that reads a number from the keyboard via the scanf function, and then prints the message The number is bigger than 100 if it is. If the number is 100 or less than 100 then you should print out the message: The number is not bigger than 100.

Code:

#include <stdio.h>
int main(int argc, char *argv[])
{
	int num;
	printf("Please enter a number: ");
	scanf("%d",&num);
	
	if(num > 100)
	{
		printf("The number is bigger than 100\n");
	}
	else
	{
		printf("The number is not bigger than 100\n");
	}
	
	return 0;
}
   
  
 
 
   

 
 
back 2 basics, nice