C Program to check eligibility

 C Program to check eligibility

#include<stdio.h>

int main()

{

int age;

printf("Enter your age : ");

scanf("%d",&age);

if(age>=18)

{

printf("Eligible to apply");

}

else

{

printf("Not Eligible to apply");

}

}



Output:

Explantion:

 Accepting age through scanf function , next checking the condition 

if the age given is greater than 18 the program prints eligible ,

if the age given is lesser than 18 the program prints not eligible .


Previous Post Next Post