Question: #include int ageCal(int years); float BMIcal(int height, int weight); void PS(int age,int year,float BMI); int main(){ int year, height; int weight; scanf(%d,&year); scanf(%d,&height); scanf(%d,&weight); printf(Age

 #include int ageCal(int years); float BMIcal(int height, int weight); void PS(intage,int year,float BMI); int main(){ int year, height; int weight; scanf("%d",&year); scanf("%d",&height);scanf("%d",&weight); printf("Age = %d Height = %dcm Weight = %dkg BMI =

#include

int ageCal(int years);

float BMIcal(int height, int weight);

void PS(int age,int year,float BMI);

int main(){

int year, height;

int weight;

scanf("%d",&year);

scanf("%d",&height);

scanf("%d",&weight);

printf("Age = %d Height = %dcm Weight = %dkg BMI = %.1f ",ageCal(year),height, weight, BMIcal(height,weight));

PS(ageCal(year),year,BMIcal(height,weight));

}

int ageCal(int years ){

int now = 2020;

return now - years +1;

}

float BMIcal(int height,int weight){

float heightM,h2;

heightM = (float) height /100;

h2 = heightM * heightM;

//printf("heightM?%f ",heightM);

//printf("h2?%f",h2);

return weight / h2;

}

void PS(int age,int year,float BMI){

if(age>19 || age

if(17

printf("Physical Status of Regular Service Draftees ");

if(year

printf("1 year of Regular Service");

}

else{

printf("4 months of Regular Service");

}

}

else if(16.5

printf("Physical Status of Substitute Service Draftees ");

if(year

printf("Substitute Services");

}

else{

printf("Replacement Service");

}

}

else if(BMI>31 &&BMI

printf("Physical Status of Substitute Service Draftees ");

if(year

printf("Substitute Services");

}

else{

printf("Replacement Service");

}

}

else if(BMI

printf("Physical Status of Military Service Exemption "); printf("Exemption from Military Service");

}

}

else{

printf("Not a Draftee ");

printf("No need to perform military Service");

}

}

I wrote it something like that however I only got 83points out of 100

I cannot find where I missing

c language

Sample 1 Input 1999 175 65 Output Age = 22 Height = 175cm Weight = 65kg BMI = 21.2 Physical Status of Regular Service Draftees 4 months of Regular Service Sample 2 Input 1994 165 44 Output Age = 27 Height = 165cm Weight = 44kg BMI = 16.2 Physical Status of Military Service Exemption Exemption from Military Service Be a Man Hard AC Ratio: 6.9% (502/7258) #lf/else #Expression The government of the Republic of China stipulates (22) that Draftees (1) born after January 1 in 1994 need to fulfill the military service for 4 months. Draftees () born on December 31 in 1993 and before need to fulfill the military service for 1 year. It is mandatory for a man in the 19-36 age range to be enlisted in the army. There are three categories of Physical Status : 1. Physical Status of Regular Service Draftees (130): 17 36 years old): 1. "No need to perform Military Service (#11)" Your task is to write a program which reads the information of a man, and print out their personal data, Physical Status/Not a Draftee (age 36 years old) and which military training he should fulfill. NOTE: If a man is not a draftee, in physical status section you should print out "Not a Draftee (age 36 years old)" INPUT AND OUTPUT EXAMPLE Input Three integers, split by spaces, represent birth year, height(cm) and weight(kg) respectively. Output You should print out the age, height, weight, BMI, Physical Status/Not a Draftee (age 36 years old) and the military service. Please see the sample output to get an example

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!