We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Greetings, Can i please contribute to the repository. Aim: "Exception Handling and error management."
The text was updated successfully, but these errors were encountered:
I added function return to the project ,
/*###################################################
###################################################*/
#include #include
// function decleration and calculation float BMI_Calc (float A,float B) { return A*10000/(B*B); }
char toUpperChar (char x);
int main() { char r; float TB, IMT, BMI; int BB;
do { printf("\n\nBody Mass Index (BMI) Calculation \n"); printf("==================================\n\n"); printf("BW : Weight (kg)\n"); printf("BH : Height (cm)\n"); printf("BMI : Body Mass Index\n\n"); printf("BW : "); scanf("%d", & BB); printf("BH : "); scanf("%f", & TB); IMT= BB/(TB*TB)*10000; printf("BMI : %0.2f\n\n", IMT); printf("You are "); // call Function BMI= BMI_Calc(BB,TB); if (BMI<18.5) printf("Underweight"); else if (BMI<23) printf("Normal Weight"); else if (BMI<25) printf ("Overweight"); else if (BMI<30) printf("Obesity"); else printf("Over obesity"); printf("\n\n Try again[Y/N]? "); do { r=getchar(); r= toUpperChar(r); }while (r!='Y' && r!='N'); }while (r=='Y'); } char toUpperChar (char x) { if (x>= 97 && x<= 122) x=x-32; return x; }
Sorry, something went wrong.
No branches or pull requests
Greetings,
Can i please contribute to the repository.
Aim: "Exception Handling and error management."
The text was updated successfully, but these errors were encountered: