subject
Engineering, 22.02.2020 05:01 gafran

LAB 3.3 – Working with String Input and Type CastingStep 1: RemovefindErrors. cppfrom the project and add thepercentage. cppprogram in yourLab3 folder to the project. Here is a copy of the source code.1 // Lab 3 percentage. cpp2 // This program will determine the percentage3 // of answers a student got correct on a test.4 // PUT YOUR NAME HERE.56 // INCLUDE THE FILE NEEDED TO DO I/O7 // INCLUDE THE FILE NEEDED TO FORMAT OUTPUT8 // INCLUDE THE FILE NEEDED TO USE STRINGS9 using namespace std;1011 int main()12 {13string name;14int numQuestions,15numCorrect;16double percentage;1718// Get student's test data19cout << "Enter student's first and last name: ";20// WRITE A STATEMENT TO READ THE WHOLE NAME INTO THE name VARIABLE.2122cout << "Number of questions on the test: ";23cin >> numQuestions;24cout << "Number of answers the student got correct: ";25cin >> numCorrect;2627// Compute and display the student's % correct28// WRITE A STATEMENT TO COMPUTE THE % AND ASSIGN THE RESULT TO percentage.2930// WRITE STATEMENTS TO DISPLAY THE STUDENT'S NAME AND THEIR TEST31// PERCENTAGE WITH ONE DECIMAL POINT.3233return 0;34 }Step 2: Replace each capitalized comment with C++ code that does what the comment asks you to do. Then compile and run the program. Here is what a sample run should look like:Sample RunEnter student's first and last name: John SmithNumber of questions on the test: 40Number of answers the student got correct: 31John Smith77.5%

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Compute the pressure drop of 30°c air flowing with a mean velocity of 8 m/s in a circular sheet-metal duct 300 mm in diameter and 15 m long. use a friction factor, f 0.02, and pair = 1.1644 kg/m a. 37.26 pa b. 25.27 pa n c. 29.34 pa d. 30.52 pa
Answers: 1
question
Engineering, 04.07.2019 19:10
Plan an experiment to measure the surface tension of a liquid similar to water. if necessary, review the ncfmf video surface tension for ideas. which method would be most suitable for use in an undergraduate laboratory? what experimental precision could be expected?
Answers: 2
question
Engineering, 04.07.2019 19:20
Air enters a horizontal, constant-diameter heating duct operating at steady state at 290 k, 1 bar, with a volumetric flow rate of 0.25 m°/s, and exits at 325 k, 0.95 bar. the flow area is 0.04 m2. assuming the ideal gas model with k = 1.4 for the air, determine (a) the velocity at the inlet and exit, each in m/s, and (c) the rate of heat transfer, in kw flow rate, in kg/s, (b) the mass kg 0.3
Answers: 2
question
Engineering, 06.07.2019 02:30
Define thermoplastic polymers and thermosetting polymers in terms of their structures, and (ii) describe briefly a process suitable for the production of products from each type of polymer.
Answers: 3
You know the right answer?
LAB 3.3 – Working with String Input and Type CastingStep 1: RemovefindErrors. cppfrom the project an...
Questions
question
History, 17.02.2021 22:50
question
English, 17.02.2021 22:50
question
Mathematics, 17.02.2021 22:50
question
Mathematics, 17.02.2021 22:50
Questions on the website: 13722359