Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources

016. Write a program to accept a number and check if it is >10, <10 or =10 in C language

By September 18, 2012 February 5th, 2018 No Comments
#include<stdio.h>
#include<conio.h>  
main()
{
  int n;
  clrscr();
  printf("enter number...");
  scanf("%d",&n);
  if(n>10)
	printf("Number is greater than 10");
  else if(n<10)
	printf("Number is lesser than 10");
  else
	printf("Number is 10");
  getch();
}



Leave a Reply

DEMO01