- Messages
- 373
- Reaction score
- 125
- Points
- 53
Hey guys, I am having problems with pseudocodes. Can anyone explain this psuecode for me and its question:
n<---0
WHILE n<=0
INPUT n
ENDWHILE
Total<--0
Count<--0
REPEAT
INPUT Number
Total <--Total + Number
Count<-- Count+1
UNTIL Count=n
OUTPUT Total/Count
Question:
Trace the psuedocode algorithm for the following sequence of data input:0,-5,5,2,5,4,6,3
Answer:
FInal output is 4
n<---0
WHILE n<=0
INPUT n
ENDWHILE
Total<--0
Count<--0
REPEAT
INPUT Number
Total <--Total + Number
Count<-- Count+1
UNTIL Count=n
OUTPUT Total/Count
Question:
Trace the psuedocode algorithm for the following sequence of data input:0,-5,5,2,5,4,6,3
Answer:
FInal output is 4