How do I use sentinal control loop? PLEASE HELP Applicants applying for a post a
ID: 3692274 • Letter: H
Question
How do I use sentinal control loop?
PLEASE HELP
Applicants applying for a post as policeman/policewomen must fulfill the following criteria: Age between 21-35 The physical qualification: The Body Mass Index (BMI) for all gender must be less than 25.0 # BMI Formula weight (kg) / (height (m))^2 Develop a program to determine whether the applicant is qualified to apply or not. State the reason, if the candidate does not qualified Check the criteria following the above order (age, physical and bmi). If the applicant does not meet the first cretin (age), your system does not have to check for the rest of the criteria. Modify your program from Task 3 of Assignment 3 Your program should repeat the process for several applicants. Use SENTINEL control loop to achieve this taskExplanation / Answer
#include<stdio.h>
void main() {
int age, weight, gender, BMI;
float height;
printf("Enter age of an applicant:");
scanf("%d", &age);
if(age>=21||age<=31)
{
printf("Enter choice of gender 1. Male 2. Female");
scanf("%d",&gender);
if(gender==1)
{
printf("Enter height of an applicant in Meters");
scanf("%f",&height);
printf("Enter weight of an applicant in Kg");
scanf("%f",&weight);
if(height>= 1.63&&weight>=50)
{
BMI=wt/(m^2);
if(BMI<25.0)
printf("Applicant qualified for the post as policeman");
}
else
printf("APPLICANT NOT QUALIFIED");
}
else if(gender==2)
{
printf("Enter height of an applicant in Meter ");
scanf("%f",&height);
printf("Enter weight of an applicant in Kg");
scanf("%f",&weight);
if(height>= 1.57&&weight>=48)
{
BMI=(weight)/((height)^2);
if(BMI<25.0)
printf("Applicant qualified for the post as policewomen");
}
else
printf("APPLICANT NOT QUALIFIED");
}
}
else
printf("Applicant is not qualified on age basis");
getch();
}
note-the above code can help to answer the given question.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.