Question: 1. Overview Write a simple C++ program that reads in an example file and outputs an example file. The project also serves to familiarize you
1. Overview Write a simple C++ program that reads in an example file and outputs an example file. The project also serves to familiarize you with the programming environment you will use during the semester. 2. Detailed Description You are going to write a program that reads text and output it in multiple column format. The input consists of a first line containing a single number C, the number of columns in the subsequent lines. The second and later lines contain C integers per line separated by whitespace. All numbers will be greater than or equal to 0 and less than 1000. Your program should output the data organized into a columns as follows: Each number occupies the space of 3 digits, right justified, and with no leading zeros Columns are separated by the string: | (space, pipe symbol, space) The first and the last line contain exactly 6C-3 dash characters (-), i.e. the same number of characters as each of the remaining lines There is no other extraneous whitespace or trailing separators For example, given a file with the following lines: 3 1 12 103 104 15 6 The output file should be: -------------------- 1 | 12 | 103 -------------------- 104 | 15 | 6 --------------------
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
