Question: i need these solved Look at the following program and answer the question that follows it. They are multiple choice i need the correct one
i need these solved
Look at the following program and answer the question that follows it. They are multiple choice i need the correct one and explanation
1.
1 // This program displays my gross wages.
2 // I worked 40 hours and I make $20.00 per hour.
3 #include
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 }
Which line(s) in this program cause output to be displayed on the screen?
A) 13 and 14
B) 8 and 9
C) 14
D) 13
E) 15
2.
What is the value of number after the following statements execute?
int number = 10;
number += 5;
number -= 2;
number *= 3;
A) 3
B) 30
C) 39
D) 2
3.
) What is the value stored at x, given the statements:
int x;
x = 3 / (4.5 + 6.4));
A) .3
B) 0
C) .275229
D) 3.3
E) None of these
4.
After execution of the following code, what will be the value of input_value if the value 0 is entered at the keyboard at run time?
cin >> input_value;
if (input_value > 5)
input_value = input_value + 5;
else if (input_value > 2)
input_value = input_value + 10;
else
input_value = input_value + 15;
A) 15
B) 10
C) 25
D) 0
E) 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
