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

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, hadellolo8839
Acompressor receives the shaft work to decrease the pressure of the fluid. a)- true b)- false
Answers: 3
image
Engineering, 04.07.2019 18:10, alyssabailey7545
Give heat transfer applications for the following, (i) gas turbines (propulsion) ) gas turbines (power generation). (iii) steam turbines. (iv) combined heat and power (chp). (v) automotive engines
Answers: 1
image
Engineering, 04.07.2019 18:10, kevin72836
Consider a large isothermal enclosure that is maintained at a uniform temperature of 2000 k. calculate the emissive power of the radiation that emerges from a small aperture on the enclosure surface. what is the wavelength ? , below which 10% of the emission is concentrated? what is the wavelength ? 2 above which 10% of the emission is concentrated? determine the wavelength at which maximum spectral emissive power occurs. what is the irradiation incident on a small object placed inside the enclosure?
Answers: 2
image
Engineering, 04.07.2019 18:10, Tyrant4life
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
You know the right answer?
LAB 3.3 – Working with String Input and Type CastingStep 1: RemovefindErrors. cppfrom the project an...

Questions in other subjects:

Konu
Spanish, 21.10.2020 22:01
Konu
Mathematics, 21.10.2020 22:01
Konu
History, 21.10.2020 22:01