Question
Write a program that accepts the following input from the keyboard: -a first name -a last Name -The scores on three tests (scores will range
Write a program that accepts the following input from the keyboard: -a first name -a last Name -The scores on three tests (scores will range from 0 to 10). They type should be double The program will calculate the average of the three scores entered from the keyboard and store the average as a rounded integer (ex. If the average is 7.57 then it will be stored as 8, but if it was 6.49, then it will be stored as 6) Then, using the rounded average calculate the corresponding course letter grade using the scoring system below. You must use a switch statement to get the letter grade. The simplified scoring system will be: 9-10 A 8 B 7 B 6 C+ 5 C 4 D+ 0-3 F Once all of the data has been processed (entered, stored and average and letter grades have computed) display on your monitor (cout) the results in the following way:
Once you are satisfied that your output is correct and properly lined up, send the same output to a file. Use example.txt as the file name. The file will be created in the same directory as your program. There you will see how to create a file for output (and input, but this time we will do only output). Once you have created the file stream associated with file example.txt, you can output to that file stream the same as you do to cout. In fact, you can think of cout as a file stream associated with your monitor, instead with a real file on disk. In order to make all the above work you need to include: #include #include #include \ #include using namespace std; You can view your output file from within Visual Studio by going to the File menu entry, clicking on Open and then on the File option. This will open the folder where your file will best saved by default. Look for example.txt, as that is the file name I need you to use when you create/open the file. It is important that you name the output file as I indicated (example.txt), since when I run your program I will expect it to create a file of the same name on my computer that I will have to check to make sure your output is correct. This is in c++.
Welcome su @ Upload Assign D file:///UsersE e Get Hom ewen X G Chapter 06.TE -) https://learn us east 1 prod fleetO1 xythos.s3.us east 1 Apps Bookmarks Dashboard Jobs a cul tro Ocean Reet Club E f Starwood Hotels & Downloads Stream TV anc Q chapter6 Flash Game Thread + 1322356?response content disposition inline%3B%20filename%2A%3DUTF 895279627Assignment% C O The 38 Essential Bo. 2016 Culinary Exter. Boston Restaurant J Boston talan Food.. Toronto's 25 Hottes %20201 4/Assignment%206.html 3/4 4 D+ 0-3 F Once all of the data has been processed (entered, stored and average and letter grades have computed) display on your monitor (cout) the results in the following way: nter the first name John nter the last nane mith nter the three test scores 46 irst---Last John-Smith Test 1--Test 2--Test3---Average---Grade 3----5,46-7.8-5-C rocess exited after 21.46 seconds with return value e ress any key to continue ..- The dashes were produced by adding setfill(-) to the output. Once you are satisfied that your output is correct and properly lined up, send the same output to a file. Use "example.txt" as the file name. The file will be created in the same directory as your program. To find more about how to output to files, read pages 160-163 (File input output). There you will see how to create a file for output (and input, but this time we will do only O Type here to search 1:37 PM 3/11/2019Step 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