Help on this Lab

Write a program that repeatedly reads in integers until a negative integer is read. The program also keeps track of the largest integer that has been read so far and outputs the largest integer at the end.

Ex: If the input is: 2 77 17 4 -1

The output is: 77
Last edited on
Yes , you should do that.
What help is required? What don't you understand/am having a problem with? Can you read an integer from the console? Do you know about looping? Post your current code so that we can comment further.
Topic archived. No new replies allowed.