The document outlines 15 programming problems involving file input/output operations. Problem 11 asks to read a file of floating-point numbers and print the average. Problem 12 asks to read a file line by line, reverse the characters of each line, and write the results to a new file. Problem 13 asks to search a file of integers for the largest and smallest numbers. Problem 14 asks to merge sorted numbers from two files into a third sorted file. Problem 15 asks to read student names, quiz scores from a file, compute averages for each student, and write results to a new output file.
The document outlines 15 programming problems involving file input/output operations. Problem 11 asks to read a file of floating-point numbers and print the average. Problem 12 asks to read a file line by line, reverse the characters of each line, and write the results to a new file. Problem 13 asks to search a file of integers for the largest and smallest numbers. Problem 14 asks to merge sorted numbers from two files into a third sorted file. Problem 15 asks to read student names, quiz scores from a file, compute averages for each student, and write results to a new output file.
The document outlines 15 programming problems involving file input/output operations. Problem 11 asks to read a file of floating-point numbers and print the average. Problem 12 asks to read a file line by line, reverse the characters of each line, and write the results to a new file. Problem 13 asks to search a file of integers for the largest and smallest numbers. Problem 14 asks to merge sorted numbers from two files into a third sorted file. Problem 15 asks to read student names, quiz scores from a file, compute averages for each student, and write results to a new output file.
The document outlines 15 programming problems involving file input/output operations. Problem 11 asks to read a file of floating-point numbers and print the average. Problem 12 asks to read a file line by line, reverse the characters of each line, and write the results to a new file. Problem 13 asks to search a file of integers for the largest and smallest numbers. Problem 14 asks to merge sorted numbers from two files into a third sorted file. Problem 15 asks to read student names, quiz scores from a file, compute averages for each student, and write results to a new output file.
containing floating-point numbers. Print the average of the numbers in the file. Prompt the user for the file name. PROBLEM12.CPP • Write a program that reads each line in a file, reverses its characters, and writes the resulting line to another file. Suppose the user specifies input.txt and output.txt when prompted for the file names, and input.txt contains the lines Mary had a little lamb Its fleece was white as snow And everywhere that Mary went the lamb was sure to go. • After the program is finished, output.txt should contain bmal elttil a dah yraM wons sa etihw saw eceelf stI tnew yraM taht erehwyreve dnA .og ot erus saw bmal ehT PROBLEM 13.CPP • Write a program that will search a file of numbers of type int and write the largest and the smallest numbers to the screen. The file contains nothing but numbers separated line breaks. PROBLEM14.CPP • Write a program that merges the numbers in two files and writes all the numbers into a third file. Your program takes input from two different files and writes its output to a third file. Each input file contains a list of numbers of type int in sorted order from the smallest to the largest. After the program is run, the output file will contain all the numbers in the two input files in one longer list in sorted order from smallest to largest. Your program should define a function that will sort the values of the two input files. PROBLEM15.CPP • Write a program to compute numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in the following format: Each line contains a student’s last name, then one space, then the student’s first name, then one space, then ten quiz scores all on one line. The quiz scores are whole numbers and are separated by one space. Make a list of 10 students in the input file. Your program will take its input from this file and send its output to a second file. The data in the output file will be the same as the data in the input file except that there will be one additional number (of type double ) at the end of each line. This number will be the average of the student’s ten quiz scores. Write a function that computes the average of each individual student.