Professional Documents
Culture Documents
Ask The User To Enter Two Integer Values
Ask The User To Enter Two Integer Values
Calip
1. Ask the user to enter two integer values. Then, get and display the 20% of the product of two
input numbers
Pseudocode
Start
Product = Int1*Int2
Result = Product*0.2
Print result
Stop
Flowchart
Start
Int1,Int2
Product = Int1*Int2
Result = Product*0.2
Print result
End
Sean Andrei G. Calip
2. Ask the user to input his/her height and weight. Then, compute his/her body mass index (BMI).
Display if the user is normal, overweight, or underweight.
Pseudocode
Start
Input Weight,Height
BMI = Weight / (Height)^2
If BMI = <18.5, Print Underweight
If else, BMI = <24.9, Print Normal
Else, Print Overweight
End
Flowchart
Start
Weight,Height
YES
BMI < 18.5 Print Underweight
NO
YES
BMI < 18.5 Print Normal
NO
End
Sean Andrei G. Calip
3. Find the sum of the numbers in each set. You are given hundred numbers divided in ten sets in
the following order.
Set 1: 1-10
Set 2: 11-20
…
Set 10: 91-100
Pseudocode
Start
Input count = 1 and a = 1
If a is <= 10
If Yes then set sum = 0 and b = 1
Else stop
Input set sum = 0 and b = 1
If b is <= 10
If yes then sum = sum + count, count = count + 1, b = b + 1
Else print sum
Input sum = sum + count, count = count + 1, b = b + 1
If b is <= 10
If yes then sum = sum + count, count = count + 1, b = b + 1
Else print sum
Input a = a + 1
If Yes then set sum = 0 and b = 1
Stop
Sean Andrei G. Calip
Flowchart
Start
count = 1 a=1
NO
End Is a <= 10? a=a+1
YES
NO
Is b <= 10?
YES