#include<stdio.h>
#include<conio.h>
main()
{
int v;
printf("Enter the number:-");
scanf("%d",&v);
if(v<10)
printf("\n Number entered is less than 10");
//sleep(2); // process halts for given value in seconds
}
The program checks if the number entered by the user is less than 10 or not.
First, the program asks the user to enter a number using the printf() statement. Then, the scanf() function is used to take an integer input from the user and store it in the variable ‘v’.
After that, the if statement checks if the value of ‘v’ is less than 10. If the condition is true, then the statement “Number entered is less than 10” is printed on the screen using the printf() function.
The program doesn’t have any additional function or feature, and once the statement is printed, the program terminates.
Thanks
Write a program to check whether the entered is less than 10.if yes display the same.