Hall H.

asked • 04/05/21

Linux assignment help

For this assignment you will write a program that allows a user to enter

timing data (minutes and seconds) and then print out some information about

the entered data.


A drop of sweat dripped from Addie's light brown hair and floated in a slow

arc towards the track. Her eyes focused on the track in front of her. It was

still disconcerting how it curved up. It was like whe was always running

inside a large hamster wheel. Well it really was a lot like that but much

bigger. The diameter of the centripetal wheel was a full kilometer. It

couldn't be any smaller than that without creating strange coriolis

effects. No matter, just having a place to run while on the ship was a huge

benefit. Addie silently thanked the designers for that foresight. And, she was

heading to Mars! How could that be bad at all?

She kept her stride as she passed the blue stripe painted across the

track. That was the lap marker and the entry point to the track. Bryce and

Vita were sitting on the floor next to the track, stretching and

talking. They'd begin their run soon. It wasn't clear if Bryce and Vita were a

'thing' or not. But it had only been three weeks since the ship left

Earth. Thirty-five more weeks to go. A lot could happen. In fact, the psychs

were worried that everyone would get stir crazy long before that. Addie didn't

think so, it was just too exciting.

The health officer required everyone to spend at least an hour on the wheel

every twenty-four hours. The track was ten meters wide so there was plenty of

room for multiple runners and walkers. On the right side of the track, every

fifty meters, were large windows facing out into the blackness of space.

Test Script

#! /bin/bash


echo "Test 1"


0 45

1 15

1 45

0 0


echo "Test 2"


0 45

0 15

1 45

0 0


echo "Test 3"


- the program reads input according to the instructions.txt

- the program calculates the average correctly

- the program calculates the fastest time correctly

- the program calculates the slowest time correctly

- the program outputs all times values in the correct format

- uses a do-while loop to read in values

- uses setw and setfill to output the time values

- no global variables

- all variables are given meaningful names

1) prompt the user to enter two integers with this text: "Enter min sec: "

2) allow the user to enter them

3) print out the two integers that the user entered

4) exit the program

DO NOT use vectors!

1 Expert Answer


Patrick B. answered • 04/06/21

4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.