Tuesday, March 22, 2011

Pseudo Code - Work out an average P1-J10-Q9a

Calculate an average in 4 Marks
Procedure Mean                            1
Total = 0
Count = 0                                        1
DoWhile there's still marks          1
Get Mark
Count = Count + 1                         Running Total
Total = Total + Mark                      Running Total
EndWhile
Average = Total / Count               1       After all the looping
End Mean

1 comment:

  1. Ahh an interesting piece of code, It took me hours to write. I washed my vest.

    ReplyDelete