include
int n;
int main () {
printf(":");
scanf("%d",&n);
if (n > = 1)&&(n <= 100){
printf("the number is valid\n");
}
}
int n;
int main () {
printf(":");
scanf("%d",&n);
if (n > = 1)&&(n <= 100){
printf("the number is valid\n");
}
}
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sukesh MarlaPosted Aug 17, 2012, 6:07 AM
Try this
if (n > = 1 && n <= 100)
{
//...
}
Check this is correct answer if it helped
VulpesPosted Aug 17, 2012, 5:44 AM
Dorababu MekaPosted Aug 17, 2012, 5:28 AM
if (n == 0 || n > 100)