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

Write a program, A5b.txt (using a text editor and DOSBox), to input the number o

ID: 3671412 • Letter: W

Question

Write a program, A5b.txt (using a text editor and DOSBox), to input the number of 8-hour days worked and the pay rate (dollars per hour) and calculate and display the dollar amount of the paycheck. Separate the output from the input with two blank lines. For example, if the number of days worked is 4 and the pay rate is 10 dollars per hour, then the output should be 320 (4*8 = 32 hours, and 32*10 = 320). In this case on the screen you should see: inputs 4 and, under that, 10, then two blank lines, and then the output 320.

Explanation / Answer

#include<iostream>

using namespace std;
int main(){
  
   int rate, days;
   cout<<"Input number of days and rate : ";
   cin>>days>>rate;
   cout<<endl<<endl;
   cout<<days<<endl;
   cout<<rate<<endl;
   cout<<endl<<endl;
   cout<<(rate*days)<<endl;
   return 0;
   }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote