Solved

Given the Following Program, Which Line(s) Cause(s) Output to Be \quad

Question 44

Multiple Choice

Given the following program, which line(s) cause(s) output to be displayed on the screen?
1 // This program displays my gross wages.
2 // I worked 40 hours and I make $20.00 per hour.
3 #include <iostream>
4 using namespace std;
5
6 int main()
7 {
8 \quad int hours;
9 \quad double payRate, grossPay;
10
11 \quad hours = 40;
12 \quad payRate = 20.0;
13 \quad grossPay = hours * payRate;
14 \quad cout << "My gross pay is $" << grossPay << endl;
15 \quad return 0;
16 }


A) lines 13 and 14
B) lines 8 and 9
C) line 14
D) lines 14 and 15
E) line 15

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions