OLEVEL PSEUDOCODE – set 3
1. Multiplication Table with Conditions
Write pseudocode to print the multiplication table for 1 to 5. For each result, if the answer
is even, print “Even Result”.
2. Sum of Odd Numbers in Nested Loops
Write pseudocode to find the sum of all odd numbers from 1 to 10, for every value of i
from 1 to 5, using nested loops. If the sum becomes greater than 20, print “Large Sum”.
3. Counting Factors with Special Message
Write pseudocode to count the number of factors for each number from 1 to 10. If the
number of factors is greater than 4, print “Many Factors”.
4. Number Pattern with Stars and Hashes
For each row from 1 to 4, and each column from 1 to 4, print “*” if the row number is
even, otherwise print “#”.
5. Checking Multiple Conditions for Number Pairs
For numbers i from 1 to 5 and j from 1 to 5, if the sum i + j is odd, and i is greater than j,
print the pair.
6. Find and Print Square Numbers
For numbers i from 1 to 10 and j from 1 to 10, if i * j is a perfect square, print “Square
Number Found”.
7. Nested Loop to Print Prime Numbers
For numbers from 2 to 10, check with another loop if a number is prime. If it is prime and
odd, print “Prime and Odd”.
8. Display Table Cell Type
For each row from 1 to 3 and each column from 1 to 3, if the row equals the column, print
“Diagonal”, otherwise if row + column equals 4, print “Opposite”.
9. Special Counting of Numbers
Use two loops with values from 1 to 3 for each. If both variables are even, print “Both
Even”. If both are odd, print “Both Odd”.
10. Print ‘Skip’ for Certain Sums
For numbers x from 1 to 5 and y from 1 to 5, if x + y is divisible by 3, print “Skip”. If x
and y are equal, print “Same”.
Let me know if you’d like to see any sample pseudocode for these questions!