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;
}

Comments

Popular posts from this blog

Deitel & Deitel, C How to Program 6th Edition, Exercise 6.23 (Turtle Graphics)

Deitel & Deitel, C How to Program 6th Edition, Exercise 6.22 (Total Sales)

Deitel & Deitel, C How to Program 6th Edition, Exercise 5.47 (Craps Game Modification)