Write a program to Java to input anl integer and check whether it is greater that hundred or less than hundred or equal to hundred
Answers
Answered by
1
Answer:
Mark me as a Brainlist plz.
Explanation:
#include <stdio.h>
int main()
{
int number;
printf("Please enter a number: ");
scanf("%d", &number);
if (number < 100)
{
printf("Number is less than 100!\n");
}
else if (number == 100)
{
printf("Number is 100!!\n");
}
else
{
printf("Number is greater than 100!\n");
}
return 0;
}
/*
Output
Run1-
Please enter a number: 10
Number is less than 100!
Run2 -
Please enter a number: 110
Number is greater than 100!
*/
or
ur another answer is there in image.
Attachments:
Similar questions