Using Word, write pseudocode to represent the logic of a program that allows the user to enter a value for hours worked in a day. The program calculates the hours worked in a five-day week and the hours worked in a 252-day work year. The program outputs all the results.

Respuesta :

Answer:

//Here is PSEUDO CODE.

1. Declare variable "hour_day".

   1.1 read the hour worked in a day and assign it to variable "hour_day".

2. Calculate the hours worked in a five day week.

   2.1 work_week=5*hour_day.

3. Calculate the hours worked in 252 days year.

   3.1 work_year=252*hour_day

4.  print the value of work_week and work_year.

5.  End the program.

//Here is code in c++.

#include <bits/stdc++.h>

using namespace std;

int main() {

double hour;

cout<<"enter the hours worked in a day:";

cin>>hour;

double work_week=5*hour;

double work_year=252*hour;

cout<<"work in a 5-day week: "<<work_week<<"hours"<<endl;

cout<<"work in a 252-day year: "<<work_year<<"hours"<<endl;

return 0;

}

Output:

enter the hours worked in a day:6.5

work in a 5-day week: 32.5 hours

work in a 252-day year: 1638 hours