Question: 30 Points EE 109 Lab 4 Reading from File and Writing to File Goal: Reading from a file and writing to a file. Instruction: Complete
30 Points EE 109 Lab 4 Reading from File and Writing to File Goal: Reading from a file and writing to a file. Instruction: Complete the following exercise and submit your lab report in MS Word file via Blackboard: 1. Do the lab exercises. 2. Your lab report should be four files: (a) Microsoft Word document/file containing (1) the C++ code and (ii) the screenshot of the standard output. (b) Source.cpp file. (c) Input file. (d) Output file. Exercises: Write a C++code to: 1. Read the radii and heights of 12 cylinders from an input file (create this file and save it in the same location as the C++ file) il. Computes the bases area, circumference, curved surface area, and volume of each cylinder. iii. Writes the radius, height, base area, circumference, curved surface area, and volume of each cylinder to the standard output and an output file (create this file as an empty file and save it in the same location as the C++ file). Use set width and precision to output the data in a table form iv
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
