EXPLORATION 28
Project 1: Body-Mass Index
It’s project time! Body-mass index (BMI) is a measurement some health-care professionals use to determine whether a person is overweight, and if so, by how much. To compute BMI, you need a person’s weight in kilograms and height in meters. The BMI is simply weight/height2, converted to a unitless value.
Your task is to write a program that reads records, prints the records, and computes some statistics. The program should start by asking for a threshold BMI. Only records with a BMI greater than or equal to the threshold will be printed. Each record needs to consist of a person’s name (which may contain ...
Get Exploring C++ 11, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.