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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions

Question

Find the limit by simplifying the expression. lim h0 (h+ 1) - 1 h

Answered: 1 week ago