
-----------------------------------
rposh00
Sun Jan 24, 2016 4:36 pm

How do I find the highest mark in the numbers that user enters (loop)
-----------------------------------
What is the problem you are having?
I need to know how to display the highest mark/number



var mark, sum, average : real
var students : int
sum := 0
students := 0
put "Enter all the marks then to finish, enter a negative number. (negative numbers wont be counted."
put ""
loop
    get mark
    exit when mark < 0
    sum := sum + mark
    students := students + 1
end loop
put ""
put "The sum of all the marks is : ", sum
average := sum / students
put "The class average is : ", average




Please specify what version of Turing you are using


-----------------------------------
Insectoid
Sun Jan 24, 2016 5:44 pm

RE:How do I find the highest mark in the numbers that user enters (loop)
-----------------------------------
Please don't bump posts. There is no need for it. It won't make us help you any faster and might just annoy us enough not to help at all.

What have you tried so far?
