#include using namespace std; int main() { float height, sum_height = 0, avg_height, max_height = -1; float weight, sum_weight = 0, avg_weight, max_weight = -1; int i, n; cout << "How many measurements do you have?" << endl; cin >> n; for (i = 0; i < n; i++) { // Get height and weight cout << "Enter height and weight " << i << endl; cin >> height >> weight; sum_height += height; sum_weight += weight; if (height > max_height) { max_height = height; max_weight = weight; } } avg_height = sum_height / n; avg_weight = sum_weight / n; cout << "Average height is " << avg_height << endl; cout << "Average weight is " << avg_weight << endl; cout << "Maximum height is " << max_height << endl; cout << "Maximum weight is " << max_weight << endl; return (0); }