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
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
question
Engineering, 04.07.2019 18:10
Which one from below is not one of the reasons of planning failures? (clo3) a)-planner is careless. b-planner spend less time in the field but more time on the desk c)-planner is not qualified d)-planner does not have sufficient time to properly plan
Answers: 3
question
Engineering, 04.07.2019 19:10
Agas is compressed from vi 0.3 m, p 1 bar to of v2 0.1 m3, p2--3 bar. pressure and volume are related linearly during the process. for the gas, find the work, in kj.
Answers: 2
question
Engineering, 04.07.2019 19:20
Liquid flows at steady state at a rate of 2 lb/'s through a pump, which operates to raise the elevation of the liquid 100 ft from control volume inlet to exit. the liquid specific enthalpy at the inlet is 40.09 btu/lb and at the exit is 40.94 btub. the pump requires 3 btu/s of power to operate. if kinetic energy effects are negligible and gravitational acceleration is 32.174 tt/s, the heat transfer rate associated with this steady state process is most closely 1)-2,02 btu/s from the liquid to the surroundings 2)-3.98 btu/s from the surroundings to the liquid. 3)-4.96 btu/s from the surroundings to the liquid. 4)-1.04 btu/s from the liquid to the surroundings.
Answers: 2
You know the right answer?
LAB 3.3 – Working with String Input and Type CastingStep 1: RemovefindErrors. cppfrom the project an...
Questions
question
English, 26.03.2020 23:54
question
History, 26.03.2020 23:54
question
Mathematics, 26.03.2020 23:54
question
History, 26.03.2020 23:54
question
Mathematics, 26.03.2020 23:54
question
English, 26.03.2020 23:54
Questions on the website: 13722367