Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following program has syntax mistakes. Correct them. On each successive line

ID: 3558680 • Letter: T

Question

The following program has syntax mistakes. Correct them. On each successive line, assume that any preceding error has been corrected. #include const int SECRET_NUM = 11,213; const PAY_RATE = 18.35 main() { int one, two; double first, second; two = 11; first = 25; second = first * three;2 second = 2 * SECRET_NUM; SECRET_NUM = SECRET_NUM + 3; cout << first << " " << second << SECRET_NUM << endl; paycheck = hoursWorked * PAY_RATE cout << "Wages = " << paycheck << endl; return 0;

Explanation / Answer

correct code

#include <iostream>
using namespace std;
const int SECRET_NUM = 11213;
const float PAY_RATE = 18.35 ;
int main()
{ int one, two,hoursWorked=8;
double first, second,paycheck;
two = 11;
first = 25;
second = 2 * SECRET_NUM;
cout << first << " " << second << SECRET_NUM << endl;
paycheck = hoursWorked * PAY_RATE ;
cout << "Wages = " << paycheck << endl;
return 0;
}

...................................

check output at https://ideone.com/KB9yuX