Pseudocode Practice Question
Pseudocode Practice Question
i. input: num
ii. if num % 2== 0 then
iii. print(‘number is even’)
iv. else:
v. print(‘number is odd’)
[end if]
vi. exit
Print(x1, x2)
v. exit
Example – 4: Write pseudocode to generate a mathematical table using a for loop. The inputs include the
number for the table and the stopping value.
Example – 5: Write an algorithm to calculate the cumulative sum of first n natural numbers.
Example – 6: You have to plan buy a mobile new mobile phone, write an algorithm using loop and
condition the whole process from beginning to end of the process. Indicate the input, output, and process.