Criteria |
Value |
age |
more than 18 |
height |
more than 1.5 meters |
experience |
more than 3 years |
C Program
#include <stdio.h>
#include <stdlib.h>
int main()
{
char name[10];
int gender,age,Exp;
float height;
printf("Enter your name:");
scanf("%s",&name);
printf("Please select 1.for male and 2.for female\n");
scanf("%d",&gender);
printf("Enter your age:");
scanf("%d",&age);
printf("Enter your height in meters:");
scanf("%f",&height);
printf("Enter your Years of Experience");
scanf("%d",&Exp);
switch(gender)
{
case 1:
if(age>=18 && height>=1.5 && Exp>=3)
printf("Congratulation Mr %s you are eligible for the interview",name);
else
printf("Sorry Mr %s you are not eligible for the interview",name);
break;
case 2:
if(age>18 && height>1.5 && Exp>3)
printf("Congratulation Mrs %s you are eligible for the interview",name);
else
printf("Sorry Mrs %s you are not eligible for the interview",name);
break;
default: printf("please enter gender correctly");
}
}
0 Comments:
Post a Comment