Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Title Comment Block i. Create your source code file named main.cpp , and at the very top of the source code use three one
1. Title Comment Block i. Create your source code file named main.cpp , and at the very top of the source code use three one line comments to document your name, date, and the exercise, using the following format: Name: Stephen May Date: 01/01/2021 Exercise: Lab4 Solution 2. Write a C++ program that performs as a Tuffy Titan Height Calculator which prompts the user for the name of a person and his/her height in feet and inches, where the name can contain spaces. Your program should allow a maximum of 20 inputs and should finish the input cycle when the user types xxx when prompted for the name. Your program should store each user input data into an arrays for later processing, where the name, feet, and inches are each in a separate array. Once the user types xxx, your program should read from the arrays and print out a report listing the name, feet, inches, centimeters, and meters of each person, where the centimeters and meters are calculated based on the user input. Your program should use the prompt and output formats exactly as provided in the samples output below. 3. Compile the file using the command below. The -std option tells the compiler that it will use C++ version 17 standards and the -o main option tells the compiler to place the executable code into a file called main. clang++ -std=C++17 main.cpp -o main 4. Run the program using the command below and repeat the steps above until you are satisfied your program output meets the above requirements. I strongly suggest that you run your program using each of the sample outputs below and ensure that all blank lines and new lines are exactly as below. Note that there are 2 blank lines between amount inserted and the dispensed or error output. ./main 5. Typical input and output: *** TUFFY TITAN HEIGHT CALCULATOR *** Enter first name (type xxx when finished): Tuffy Titan Enter feet: 7 Enter inches: 6 Enter first name (type xxx when finished): Buzz Lightyear Enter feet: 0 Enter inches: 11 Enter first name (type xxx when finished): Donald Duck Enter feet: 3 Enter inches: 0 Enter first name (type xxx when finished): Elsa Enter feet: 5 Enter inches: 7 Enter first name (type xxx when finished): Ariel Enter feet: 5 Enter inches: 4 Enter first name (type xxx when finished): Lilo Enter feet: 3 Enter inches: 5 Enter first name (type xxx when finished): xxx Name Feet Inches Centimeters Meters ======== ==EEEE =========== ===== 7 6 11 Tuffy Titan Buzz Lightyear Donald Duck Elsa Ariel Lilo 228.6 27.9 91.4 170.2 162.6 104.1 3 5 5 3 2.286 0.279 0.914 1.702 1.626 1.041 7 4 5
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started