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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Dorababu MekaRank #457 · 5.5K reputationPosted Aug 17, 2012, 1:28 AM EDT
if (n == 0 || n > 100)
VulpesRank #55 · 29.2K reputationPosted Aug 17, 2012, 1:44 AM EDT
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 17, 2012, 2:07 AM EDT
Try this
if (n > = 1 && n <= 100)
{
//...
}
Check this is correct answer if it helped