Question

1) True|False: You are about to write your pseudocode for the program that will read many...

1) True|False: You are about to write your pseudocode for the program that will read many time cards (with time in & out hours), and output the total regular hours and total overtime hours. The first step of your pseudocode can be    “ Set Total_regular_hours to zero”.    

2)True|False: You are about to write your pseudocode for the program that will read many time cards (with time in & out hours), and output the total regular hours and total overtime hours. The last step of your pseudocode can be    “ Output Total_regular_hours and Total_overtime_hours”.

3)

True|False: You are about to write your pseudocode for the program that will read many time cards (with time in & out hours), and output the total regular hours and total overtime hours. The following pseudocode is complete and correct.     

  1. Set Total_regular_hours to zero;
  2. Set Total_overtime_hours to zero;
  3. Get client’s Time_in and Time_out;
  4. Let Regular_hours be (Time_out – Time_in);
  5. If Regular_hours is more than 8 hours

      then   Overtime_hours is (Regular_hours – 8)

and   

                 Regular_hours is only 8 ;

       else Overtime_hours is zero;

  1. Add Overtime_hours to Total_overtime_hours;
  2. Add Regular_hours to Total_regular_hours;
  3. If there is more time cards to read, then go to step 3;
  4. Output Total_regular_hours and Total_overtime_hours;

4)True|False

You are about to write pseudocode to compute the result value of the formula:  

( X * Y / Z + P + R )  

The following pseudocode is complete and correct.

  1. Compute X * Y, and put its result to T1 ;
  2. Compute Z + P, and put its result to T2 ;
  3. Compute T1 / T2 , and put its result to T3 ;
  4. Compute T3 + R, and put its result to T4 ;
  5. The final result value is in T4 ;
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)pseudocode can be    “ Set Total_regular_hours to zero”.  

Ans: True

because starting of the program regular_hours is zero and when ever we take user choice hours are more than 8 or exactly 8.

2) pseudocode can be    “ Output Total_regular_hours and Total_overtime_hours”.

Ans:True

we are calculating the Total_regular hours and total_overtime_hours.so we print output of this two values.

3) Ans : True

what ever mentioned in the third question is correct because (if regular hours are more than 8 then overtime is regular hours-8) and if regular hours is exactly 8 hours then the client don't to ant extra time.so in this case overtime is zero.all statements are correct.

4) Ans :False

Compute Z + P, and put its result to T2 ; is not correct because according to pemdas rule in programming * and / are having equal priority but left to right associative property followed. According to that first

  1. Compute X * Y, and put its result to T1 .
  2. Compute T1/Z and put its result to T2 ;
  3. Compute T2+ P, and put its result to T3 ;
  4. Compute T3+ R, and put its result to T4 ;
Add a comment
Know the answer?
Add Answer to:
1) True|False: You are about to write your pseudocode for the program that will read many...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Program Description: Write the pseudocode for a program that will calculate and display an employee’s gross...

    Program Description: Write the pseudocode for a program that will calculate and display an employee’s gross pay. Input the number of hours an employee worked for each of the 5 days of the week. Add them all up to get his hours worked for the week. Weekly Pay is calculated by adding an employee’s normal pay plus any overtime pay. Normal hours are paid at $10/hr. Any over time is paid at $15/hr. Any hours over 40 are considered overtime....

  • CAN SOMEONE COMPLETE THIS CODE PLEASE THNK YOU!! Question - Write a program in c++ that...

    CAN SOMEONE COMPLETE THIS CODE PLEASE THNK YOU!! Question - Write a program in c++ that keeps an appointment book. Make a class Appointment that stores a description of the appointment, the appointment day, the starting time, and the ending time. Your program should keep the appointments in a sorted vector. Users can add appointments and print out all appointments for a given day. When a new appointment is added, use binary search to find where it should be inserted...

  • Design a program(Creating a RAPTOR flowchart) that will read a file of employee records containing employee...

    Design a program(Creating a RAPTOR flowchart) that will read a file of employee records containing employee number, employee name, hourly pay rate, regular hours worked and overtime hours worked. The company pays its employees weekly, according to the following rules: regular pay = regular hours worked × hourly rate of pay overtime pay = overtime hours worked × hourly rate of pay × 1.5 total pay = regular pay + overtime pay Your program is to read the input data...

  • Assignment 4 File “quad_sol.s” contains a quadratic polynomial solver, which calculates the integer solution of a quadratic polynomial equation. 1. Rewrite the program using instructions reordering to...

    Assignment 4 File “quad_sol.s” contains a quadratic polynomial solver, which calculates the integer solution of a quadratic polynomial equation. 1. Rewrite the program using instructions reordering to reduce the number of cycles needed to execute the program. Indicate the number of cycle reduction. 2. Describe how forwarding would affect the execution of the program. CODE # quad_sol.s # This assembly program calculates the integer solutions of a quadratic polynomial. # Inputs : The coefficients a,b,c of the equation a*x^2 +...

  • Can you write this program MPI Simplest easiest way to read it as possible For parallel...

    Can you write this program MPI Simplest easiest way to read it as possible For parallel programming This exercise is from Question 6-5 of the textbook at page 194 Implement the butterfly barrier described in Section 6.1.4, assume the number of processes is a power of 2, e.g.2,4, 8, 16, etc. Investigate the time taken by your butterfly barrier by using the code such as: t1 = MP1wtime(); butterfly barrierO;//call to your butterfly barrier t2 MPIwtime(); printf Elapsed time %d...

  • im trying to complete mips program code about a calculator program that can calculate integer addition...

    im trying to complete mips program code about a calculator program that can calculate integer addition / subtraction written using the MIPS assembler. im having hard times to debug this. The input is given to the array of Formula char (base address $ s0) in the form of a formula. The null character (\ 0, ASCII code 0) is placed at the end. The calculation result is given to the register $ s1 and the overflow is ignored. For example,...

  • Write a python program and pseudocode The Program Using Windows Notepad (or similar program), create a...

    Write a python program and pseudocode The Program Using Windows Notepad (or similar program), create a file called Numbers.txt in your the same folder as your Python program. This file should contain a list on floating point numbers, one on each line. The number should be greater than zero but less than one million. Your program should read the following and display: The number of numbers in the file (i.e. count them) (counter) The maximum number in the file (maximum)...

  • C Programming Write a program that meets the following requirements: • Your program will read three...

    C Programming Write a program that meets the following requirements: • Your program will read three integer values from the keyboard. • Your program will output the following data in this order: 1. The third divided by the first if the first is not zero. 2. The third divided by the second if the first is zero and the second is not zero. 3. The sum of the first, second and third values. • All numbers are integers and only...

  • Write a C++ program that computes the following series: sum = 1/firstPrime + 2/secondPrime+…..+1/nthPrime Your program...

    Write a C++ program that computes the following series: sum = 1/firstPrime + 2/secondPrime+…..+1/nthPrime Your program should prompt the user to enter a number n. The program will compute and display sum based on the series defined above. firstPrime: is 2 secondPrime: the first prime number after 2 thirdPrime: the third prime number …. nth prime: the nth prime number Your program must be organized as follows: int main() { //prompt the user to enter n //read n from the...

  • use at least two functions in your program. . Write a program that calculates weekly payment....

    use at least two functions in your program. . Write a program that calculates weekly payment. The program will ask the user full name, ID number (make one up), and hours worked. An hourly worker’s gross pay is basically his/her work hours that week multiplied by his/her regular hourly pay rate. However, after the first 40 work hours of the week, each additional work hour is paid at an overtime rate that is 1.5 times of the regular hourly rate....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT