You are on page 1of 2

1. Loop I from 0 to MARKS.

length -1
If I > 70 then
Output(I)
End if
End loop

2. Sum = 0
Loop I from 0 to NUMBERS.length -1
sum = sum + NUMBERS[I]
End loop
Avg = sum / NUMBERS.length
output(Avg)

3. Output MARKS[0]
4. Output NUMBERS[2]
5. Output ARGUMENTS[-1]
6. Output ARGUMENTS[arguments.length -1]
7. MARKS[MARKS.length -2] = 90.5
8. Loop I from 0 to ANIMALS -1

Extension

1. ARRAY = TESTS

sum = 0

loop I from 0 to TESTS -1

sum = sum + TESTS[I]

end loop

avg = sum / TESTS.length

ABOVE = 0

BELOW = 0

loop I from 0 to TESTS-1

if I > avg then

ABOVE = ABOVE + 1
end if

if I < avg then

BELOW = BELOW + 1

end if

end loop

Output avg

Output ABOVE

Output BELOW

2. Array = [1,2,3,4,5]

Counter = 4

loop I from 0 to 4

Output Array[Counter]

Counter = Counter -1

End loop

You might also like