Professional Documents
Culture Documents
3
3
3
: 3
Name: Lee Ann Imperial Section: CHE11S1
Date Performed: 4/13/21
Date Submitted: 4/15/21
Instructor: Ms. Cherry Casuat
LABORATORY
ACTIVITY NO.3
CONTROL
STRUCTURE
(Conditional
Structure)
1. Objective(s):
3. Discussion:
Syntax:
if (<conditional expression>)
{
statement;
}
Syntax:
if (<conditional
expression>))
statement1;
else
if (<conditional
expression>))
statement2;
else
if (<conditional
expression>))
statement3;
4. Resources:
DevC++
5. Procedure and Output
EXERCISE No. 1
A student took four quizzes in a term and would like to compute their
average. He also would like to know if the average has a passing mark. Note
that the passing mark is 75%.
REQUIREMENTS:
FLOWCHART
START
Avg=(q1+q2+q3+q
4)/ 4
Print avg
Avg >= 75
YES
NO Print PASSED
Print FAILED
END
Record your screen display:
QUESTIONS:
avg >=75
Mary Jane would like to invest her money amounting 100,000 at the bank.
Before investing her money, she would like to determine which type of
account that she will chose. The amount of interest that her money earns
depends on which type of account the money is in. The bank has 6 different
types of accounts and they earn interest as follows:
ALGORIT
HM
NARRATI PSEUDOCODE
VE
FLOWCH
ART
1. What are the data needed for the solution of the program to produce the
desired output?
EXERCISE No.3
A student took four quizzes in a term and would like to compute their
average. He also would like to know what will be the remarks. Follow the
range of grades and its equivalent remarks, and then fill-up the table below:
100-95 - Excellent
94-90 – Very
Satisfactory
89-85 -
Satisfactory
84-80 - Fine
79-75 - Fair
74 and below –
Poor
REQUIREMENTS
FLOWCH
ART
Record your screen display:
QUESTIONS:
if (num2> num3)
if (num1 >
num2)
valueNum
=num2;
else
valueNum =num3;
else
if (num2 >
num3)
valueNum
=num1;
else
valueNum = num3;
Record the output screen display:
Explain your answer.
6. Conclusion: