Get the answers you need at Westonci.ca, where our expert community is always ready to help with accurate information. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

THE IF STATEMENT

The IF statement allows one of two sets of statements to be executed, depending upon a condition. A structure diagram of the first program we shall consider which contains a control statement is shown in Figure 5 .1. The program computes an employee's weekly pay given the number of hours worked by the employee and his hourly rate of pay. Hours worked over 37.5 are paid at time-and-a-half. So, a different calculation must be made, depending on whether the number of hours worked is greater than

37.5 or not.





Using the information above, Write a program in COBOL. that follows and the diagram below. The first four lines of your code should include the date, author, purpose and your class information.

Include a comment that declares named constants and variables. Include variables for hours worked, pay rate, and pay.

Include a comment that describes the input items to display and accept information from the user.

Include a comment to calculate the pay raise.

Before you consider the program, you need to first look at the components of a structure diagram. Straightforward actions, such as input, arithmetic, and output functions, are contained in rectangular (or square) boxes. Hence, the input, output and two calculations are each in rectangular boxes. A two-way conditional function is represented by three triangles in a rectangle. The center triangle contains the condition (e.g. HOURS-WORKED> 37.5) and the two outer triangles contain the result of the condition (e.g., YES and NO). The actions for each result of the condition are contained in rectangles below each of the outer triangles (e.g. the two rectangles each containing a calculation).

The last comment will display a message “ This program computes pay plus time and a half. Use the diagram below to help construct the if else program.

THE IF STATEMENT The IF Statement Allows One Of Two Sets Of Statements To Be Executed Depending Upon A Condition A Structure Diagram Of The First Program We Sha class=