Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You can calculate your maximum safe heart rate by subtracting your age from 220. For example, if youre 45 years old, subtract 45 from 220

You can calculate your maximum safe heart rate by subtracting your age from 220. For example, if youre 45 years old, subtract 45 from 220 to get a maximum heart rate of 175. If you are 20 year old, maximum safe heart rate will be 200. This is the average maximum number of times your heart should beat per minute during exercise.

Reference: Mayo Clinic

Let us say you wore a smart-watch and went for a run! Let us assume that your watch has captured your heart rate periodically and saved it as a series of data points in a file. Write a program to accept your age as the first input and a filename as the second input. Your program should open that data file, read the series of data and find % of the data points that are below the maximum safe heart rate. Here is a sample input and output (output % should have exactly one fractional digit):

20 run1.txt 96.9%

IN C++ PLEASE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

4. Describe cultural differences that influence perception

Answered: 1 week ago