Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How do I find the highest mark in the numbers that user enters (loop)
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
rposh00




PostPosted: Sun Jan 24, 2016 4:36 pm   Post subject: 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

Turing:


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
<4.1.1>
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sun Jan 24, 2016 5:44 pm   Post subject: 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?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: