C Language - if else Program
#include <stdio.h>
#include <conio.h>
int main()
{
int age;
printf("Enter your age first\n");
scanf("%d", &age);
printf("You have entered %d as your age\n", age);
if (age>=18) {
printf ("You can watch hollywood movies");
}
else if (age<=12 && age >=5){
printf ("You can watch only comedy based movies ");
}
else if (age>=13) {
printf ("You can watch suspense movies ");
}
else {
printf ("Sorry! you are child and cannot watch hollywood movies ");
}
}
// ScreenShots:
Comments
Post a Comment