ProAnswers.org

Write a C program to check whether the entered number is less than 10. If yes, display the same?.

#include

#include 

void main() 

{ 

int v; 

clrscr(); 

printf(“Enter the number:”); 

scanf(“%d”, &v); 

if(v<10) 

printf(“

Number entered is less than 10”);

sleep(2); 

getch(); 

} 

Output: 

Enter the number:9 

Number entered is less than 10