You are on page 1of 4

Sheet #1: Flowcharts

1) Find the area of square


o Draw a flowchart
o Write a pseudocode

Enter the length of side


Area= L^2
display (Area)

2) Find the greatest one of two numbers


o Draw a flowchart
o Write a pseudocode
Enter the value of A
Enter the value of B
If A greater than B then print A is large
If not then print B is large
3) Determine Whether A Student Passed the Exam or
Not
o Write a pseudocode
o Draw a flowchart

Input grades of 4 courses M1, M2, M3 and M4,


Calculate the average grade with formula
Grade= (M1+M2+M3+M4)/4
If Grade is less than 60, print "FAIL", else print "PASS".
4) Determine Print Hello World 100 times
o Write a pseudocode
o Draw a flowchart

Initialize count = 0
Print Hello World
Increment count by 1
Is count < 100
if YES go to step 2
else stop
end

5) Convert temperature from Fahrenheit to Celsius


C= (F-32)*5/9
o Draw a flowchart
o Write a pseudocode

Enter the value of Fahrenheit degree (F)


C= (F-32)*5/9;
Print (The value of Celsius degree is :)
Print C
6) Calculate the sum of numbers from 1 to 100
o Write a pseudocode
o Draw a flowchart
Initialize sum = 0 and n = 0
Increment count by 1 via a loop
Find sum + n and assign it to sum
Is n>100
If No go to step 2
Else
Print sum

7) Guess my number game


The game selects a random number between 1 to 5, and the
user tries to guess the number via ONE TRIAL ONLY !
o Write a pseudocode
o Draw a flowchart

Print ("Welcome to 'Guess My Number between 1 to 5'!")


Print (“Think of a number between 1 and 5")
The number is a random between (1:5)
Guess = input a number from 1:5
If Guess = the number then print
(Excellent! You are lucky! ... You WIN)
If guess > the number then print (Lower ... You Lose)
Else print (Higher ... You Lose)

You might also like