Ask Question
7 February, 01:59

Look at the following program and answer the question that follows it. 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?

+2
Answers (1)
  1. 7 February, 02:42
    0
    The answer is "14 Line".

    Explanation:

    In the given C+ + language code the main method defines a variable that is "hours, payRate, and grossPay". In which variable hours is an integer variable and payRate and grossPay is double type variable.

    In hours and payRate variable, we assign a value that is "40 and 20.0" and the variable grossPay assign formula that calculates value and holds value in this variable. Then we use print (cout) function to print grossPay variable value.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Look at the following program and answer the question that follows it. 1 / / This program displays my gross wages. 2 / / I worked 40 hours ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers