What exactly is your question? - the code you posted displays the results.
JamesCherrill
... trying to help
8,519 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30
Logically you don't know the highest number until all the numbers have been input, so to show all the differences you will have to store all the numbers (eg in an array) as they are input. Then, when you know the largest, you can loop through the array and disaply all the differences.
JamesCherrill
... trying to help
8,519 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30
... only if you have time travel!
You start with an array that's big enough, fill in the data and keep track of how many data were entered ( = how many of the array elements have been used)
JamesCherrill
... trying to help
8,519 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30
Sorry, but no. I'm no going to write your homework for you. Your teacher obviously thinks that you should know enough about arrays, or are ready to learn enough, so that's what you should do. Here a good place to start:
http://docs.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
It's up to you to try your best. There are plenty of people here who will help you if you do.
JamesCherrill
... trying to help
8,519 posts since Apr 2008
Reputation Points: 2,583
Solved Threads: 1,455
Skill Endorsements: 30
Question Answered as of 2 Months Ago by
JamesCherrill