Professional Documents
Culture Documents
Correcting Errors in Pseudocode
Correcting Errors in Pseudocode
Counter = 10 in line 8.
Large should be = 0 in line 1.
Counter + 1 in line 7
Total = total + num in line 4
Remove line 5
Large = 0
Counter = 0
REPEAT
INPUT Num
IF Num > Large THEN Large = Num
Counter = Counter + 1
UNTIL Counter = 10
PRINT Large
Line 6 should be the last line
Total = 0
Counter = 0
FOR Counter 1 to 10
INPUT Num
Total = Total + Num
NEXT Counter
PRINT Total
Line 2
OutRange = 0
Line 6
OutRange = OutRange +1
Line 7
Should be removed
Line 8
NEXT Counter
Line 2
Counter = 0
Line 6
Num > 0
Line 7
Line 8
Counter = Counter + 1
Line 5
Num18 = Num18 + 1
Line 8
PRINT Num18
2
Counter = 0
7
Counter = Counter + 1
10
Count = 100
Count <--0
Sum <--0
FOR Count 1 to 100
INPUT Number
Sum <---Sum + Number
NEXT Count
PRINT Sum
2
Counter = 0
Counter = Counter = 1
10
PRINT '
Enter a number between 100 and 1000',INPUT Number
4
PRINT '
This is incorrect,please tryagain',INPUT Number
10
PRINT Count
Line 2
Line 3
INPUT Number
W HILE Number <> 999 DO
W HILE Number > 100 AND Number < 200
PRINT Number
ENDW HILE
ENDW HILE
Count
30
Total
NEXT
Line 1
Total = 000.00
Count <---0
Line 2
Total <---0
IF Number > 0
Count <--0
Line 3
High <---0
Line 4
Low <---10000
Number of rej
ected items won'
t be calculated
properly
Rej
ect <--Rej
ect + 1
Program won'
t stop at 500 items
Rej
ect <---Rej
ect /Count *100
Line 6
Line 10
TotalTryincorrect
TotalTry<----TotalTry+ 1
Program won'
t run correctly