LAB 04 (Graded Lab 01) - Conditional Logic in Flowcharts Using Flowgorithm
LAB 04 (Graded Lab 01) - Conditional Logic in Flowcharts Using Flowgorithm
LAB 04
GRADED LAB 01
Objective:
Activities:
● Creating flowcharts using relational operators and control structures (if, if...else).
● Exercises on logical operators (AND, OR, NOT) and operator precedence.
● Developing flowcharts with nested if-else statements.
Submission Instructions:
Flowgorithm Files:
● Save your Flowgorithm flowchart files for each task for Task01.fprg
● File format should be .fprg (Flowgorithm's native file format).
Submission Format:
● Combine all Flowgorithm file into a single compressed folder (ZIP folder).
● Name the folder using the format: YourID_ITC_Lab4.zip
Submit Via:
Upload the ZIP file on Horizon Portal in your ITC Lab course submission.
Submission is only allowed during the Lab hours and within the Lab.
Steps:
Expected Outcome: A flowchart that correctly outputs if a given number is even or odd.
Steps:
Expected Outcome: A flowchart that accurately categorizes the grade based on conditions.
Steps:
Expected Outcome: A flowchart that applies the correct discount based on conditions.
Steps:
First, check if num1 is greater than or equal to both num2 and num3.
Expected Outcome: The flowchart correctly outputs the largest of the three numbers
Steps:
1. The values a, b, and c in the equation represent constant values. So 4x2 − 17x − 15 = 0
represents a quadratic equation where a = 4, b = −17, and c = −15. The roots may be
calculated by substituting the values of a, b, and c into the following two formulas:
−𝑏 + 𝑏2 −4𝑎𝑐 −𝑏 − 𝑏2 −4𝑎𝑐
𝑥1 = & 𝑥2 =
2𝑎 2𝑎
2. COMPUTE D = (B*B − 4*A*C) (Calculate the value of the discriminant) and store in D
3. IF D < 0
Expected Outcome: The flowchart correctly outputs the results of quadratic equation.
Steps:
The following rules are used to calculate the bonus for the employees of an organization.
(i) If the pay is more than $3,000, the bonus amount is fixed, and it is equal to $300.
(ii) If the pay is more than $1,600, but less than or equal to $3,000, the bonus will be 10% of
the pay subject to a maximum of $240.
(iii) If the pay is less than or equal to $1,600, the bonus is 15% of pay, subject to a minimum
of $100.
Design a flowchart that calculates the monthly electricity bill based on usage and applies a
surcharge if usage exceeds a certain threshold.
Steps:
Input: Prompt the user to enter the total number of units (kWh) consumed.
Use nested If-Else conditions to apply the correct rate based on the number of units
consumed.