Professional Documents
Culture Documents
Logic Structures
Logic Structures
FLOWCHART
PSEUDOCODE
START START
If integer > 0
Print “NEGATIVE”
END
Read Integer
If integer > 0 Y
Print
“POSITIVE”
Print
“NEGATIVE”
END
HERRERA, FATIMA MARIE S. October 19, 2022
PCEIT-02-101A CPE01
2. Write the pseudocode and draw the flowchart that will compute for the customers senior
citizens discount in the store. If the customer is 60 years old and above the discount is 20% of
the gross amount. User will input the gross amount purchased and the age of the customer.
FLOWCHART PSEUDOCODE
START
START
Initiallized all the needed variables.
Else
Read Age
Discount = 0
End
N If age ≥ 60
Y
Discount = Gross
Discount = 0 Amount Purchased
*20%
END
HERRERA, FATIMA MARIE S. October 19, 2022
PCEIT-02-101A CPE01
3. Given a set of ten integers, determine how many are negative and how many are positive. Write
the pseudocode and draw the flowchart that will print the number of positive and negative
numbers given.
FLOWCHART PSEUDOCODE
START
START
Initiallized all the needed variables.
End
Count Positive I = 0 + 1
Count Negative I = 0 + 1
Count ≤ 10 N
END
HERRERA, FATIMA MARIE S. October 19, 2022
PCEIT-02-101A CPE01
4. Given 20 customers in a supermarket of varying ages, write the pseudocode that will compute
for the net amount to be paid. Senior citizens are given 20% discount on the gross amount. The
number of items, unit price, product name and age of the customers are inputted by the user.
FLOWCHART
START
Costumer = 0
Costumer = 0 + 1
Costumer ≤ 20
END
HERRERA, FATIMA MARIE S. October 19, 2022
PCEIT-02-101A CPE01
PSEUDOCODE
START
Costumer = 0
Costumer = 0 + 1
If age ≥ 60
Else
Then, Discount = 0
End