Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ only Program 1 Create a file with notepad, called firstLastAge.txt. Fred Smith 21 Tuyet Nguyen 18 Joseph Anderson 23 Annie Nelson 19 Julie Wong

C++ only

Program 1 Create a file with notepad, called firstLastAge.txt. Fred Smith 21

Tuyet Nguyen 18

Joseph Anderson 23

Annie Nelson 19

Julie Wong 17

Write a program that 1) Open the firstLastAge.txt file

2) Read the FirstName, LastName and Age.

3) Write a loop to read each line, until eof()

4) Print out the read data 5) Close the file. Use filename: Week17YourNameProg1 Program 2 Use the file firstLastAge.txt from program 1. Read in the data and print out the name and age of the youngest person, and also the oldest person. Use filename: Week17YourNameProg2 Program 3 Write a program that asks the user for the number of times to input some first names. Open a file for output, called savedNames.txt. Write a loop that reads in the user inputted first names, one at a time, the number of times specified. Each time a name is entered by the user, write the name to the savedNames file. Close the file. Look to see if the file was create, and if the names are in it Use filename: Week17YourNameProg3 Program 4 Write a program that the user is prompted for 10 test scores. 0 to 100 points each score. Open a file for output, called savedTestScores.txt. Write a loop that prompts the user for the 10 test scores. Each time a test score is entered by the user, write the test score to savedNames file. And save each test score to an array, called arrayTestScores. Close the file. Using the scores stored in the array, write a loop that reads through the array to determine the minimum, maximum and average test scores. Print out the minimum, maximum and average test scores. Are the scores written to the file ? Use filename: Week17YourNameProg3

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

Ability to work comfortably in a team environment

Answered: 1 week ago

Question

Exposure to SQL desirable but not required

Answered: 1 week ago