Question: Problem 1. Run Tracking (30 points) An athlete runs every day for five days. Write a program that computes the total distance and average distance

Problem 1. Run Tracking (30 points) An athlete runs every day for five days. Write a program that computes the total distance and average distance ran by the athlete. The program should ask the user for the number of miles run on each day (Monday to Friday), and save the values entered by the user in five different variables. The program should first calculate the total miles ran by the athlete and store the result in a variable named sum. Then the program should compute the average distance covered and store it in a variable named average. Display the total distance and the average distance on the screen. Name your program file Hw1_q1_code.c. (TIP: Use scanf function, and float/double data type for all variables) Example hints and inputs: (purple texts are what the program should print on the screen to instruct the user, the black texts are what the user types in)

Input the miles for Monday: 2.5

Input the miles for Tuesday: 1.5

Input the miles for Wednesday: 2.2

Input the miles for Thursday: 1.8

Input the miles for Friday: 3.0

Example outputs: Sum = 11 miles Average = 2.2 miles

I know this is probably simple to most, but I'm super new to coding and not entirely sure as to where to even start? Also it's supposed to be in C (using Notepad++)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!