subject

Write a program that opens a text le called quiz. txt for reading. This le contains a single line with a student's rst name then one space, then the student's last name, then one space, then some number of quiz scores that, if they exists, are separated by one space. The student will have between zero and ten scores (inclusive), and each score is an integer between 0 and 100 (inclusive). The le may or may not end with a new line character. Your program will read the data from this le and write its output to a second le. The data in the output le (named average. txt) will contain the student's quiz scores followed by the average of the student's quiz scores. The output le must be formatted as described below. 1. Each quiz score should be listed in a right-justied column that is 4 characters wide. Note that if a student has fewer than 10 scores (they have missed one or more of the quizzes), your program will need to display the missing score(s) using 0 for each one. 2. The average should appear in its own column that is 10 characters wide. Note that if a student has fewer than 10 scores, the average is still the sum of the quiz scores divided by 10. 3. The average should be computed with an accuracy of two decimal places.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:10
When you reach a yield sign, yield to cross traffic and before you enter the intersection. a. flash your headlights b. wait for a signal c. wait five seconds d. wait for a safe gap
Answers: 1
question
Computers and Technology, 22.06.2019 11:00
Which law requires employers to provide safe working environments for their employees? a. civil rights act b. fair labor standards act c. occupational safety and health act d. wagner act
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
You know the right answer?
Write a program that opens a text le called quiz. txt for reading. This le contains a single line wi...
Questions
question
Mathematics, 16.04.2020 21:35
Questions on the website: 13722363