0% found this document useful (0 votes)
33 views2 pages

Exercise 3

The document contains pseudocode for 3 problems: 1) calculating the average score of 6 quizzes and determining if the student passes or fails, 2) identifying the biggest and smallest of 3 input numbers, 3) calculating the sum, difference, product, quotient, and average of 4 item prices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

Exercise 3

The document contains pseudocode for 3 problems: 1) calculating the average score of 6 quizzes and determining if the student passes or fails, 2) identifying the biggest and smallest of 3 input numbers, 3) calculating the sum, difference, product, quotient, and average of 4 item prices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name: Maribel Magayon Subject: Computer

Exercise#03 Fundamentals and


Section: PCEIT-02-101P Programming

Write the pseudocode for the problems given below. Data is user
input.
1. Write the pseudocode for adding the quizzes as given below and
get the average score of the student for the six quizzes. Also
determine if the student passes or fails base from the average score.
Average score below 70 fails.
Scores: quiiz1 = 50, quiz2 = 65, quiz3 = 90, quiz4 = 40, quiz5 = 95,
quiz6 =100
To calculate Ave=(Q1+Q2+Q3=Q4+Q5+Q6)/QT
Start
Let Q1=50,Q2= 65,Q3=90,Q4=40,Q5=95,Q6=100 and QT=6
sum=Q1+Q2+Q3+Q4+Q5+Q6
sum=50+65+90+40+95+100
Ave=sum/6
Mark: Pass 71-100, Fail 0-70
DISPLAY _Ave
DISPLAY_Mark
Stop

2. Write the pseudocode given the information below


a. Input three numbers (whole numbers only)
b. Identify the biggest number among the three numbers
c. Identify the smallest number among the three numbers
Start
Number,N1,N2,N3
Get N1,N2,N3
IF N1>N3 THEN
Print “N1 IS BIGGER”
Else
Print “N3 IS BIGGER”
Else IF N2>N3 THEN
Print “N2 IS BIGGER”
Else
Print “N3 IS BIGGER”
END IF
Stop
Start
Number,N1,N2,N3
Get N1,N2,N3
IF N1<N3 THEN
Print “N1 IS SMALLER”
Else
Print “N3 IS SMALLER”
Else IF N2<N3 THEN
Print “N2 IS SMALLER”
Else
Print “N3 IS SMALLER”
END IF
Stop
3. Write the pseudocode that will determine the sum, difference,
product,quotient, and average of the given item prices.
Prices: 75, 90, 70 & 95
Start
Initialize all needed variables
Read prices: 75,90,70 & 95
Sum of (75+90+70+95)
Ave= sum/4
Display result
Difference of (75-90-70-95)
Ave= difference/4
Display result
Product of (75x90x70x95)
Ave= product/4
Display result
Quotient of (75÷90÷70÷95)
Ave= quotient/4
Display result
General Average= ave/4
Stop

You might also like