Deitel & Deitel, C How to Program 3rd Edition, Chapter 3, Body Mass Index
//The program that calculates body mass index
#include <stdio.h>
int main() {
int weight, height, bmi;
printf("Welcome to BMI calculator <3\n");
printf("My weight is: ");
scanf("%d", &weight);
printf("My height is: ");
scanf("%d", &height);
printf("Your BMI is: %d", weight/height/height);
return 0;
}
#include <stdio.h>
int main() {
int weight, height, bmi;
printf("Welcome to BMI calculator <3\n");
printf("My weight is: ");
scanf("%d", &weight);
printf("My height is: ");
scanf("%d", &height);
printf("Your BMI is: %d", weight/height/height);
return 0;
}
Comments
Post a Comment