Q. Write pseudocode for following :-
Answer :-
(a)
X = input "x"
Y = input "y"
Z = input "z"
If x is greater than y
If x is greater than z
Display "x is largest number"
Else
Display "z is greatest number"
Else
If y is greater than z
Display "y is largest number"
Else
Display "z is greatest number"
(b)
c = 0
s = 0
while c is less than 5
n = input a number
s equal to s + num
c equal to c + 1
avg = s / 5
display avg
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )