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 int hours;
9 double payRate, grossPay;
10
11 hours = 40;
12 payRate = 20.0;
13 grossPay = hours * payRate;
14 cout << "My gross pay is $" << grossPay << endl;
15 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:
Verified
Q51: Which of the following lines must be
Q52: The data type used to declare variables
Q53: Which of the following statements correctly defines
Q54: A variable's _ is the part of
Q55: What is output of the following statement?
cout
Q57: What will be the output after the
Q58: Which part of the following line is
Q59: Using C++11:
What data type does the compiler
Q60: Which of the following defines a double-precision
Q61: Select all that apply. Which of the
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents