|
-
February 4th, 2013, 07:30 AM
#2
Re: Beginner needs help! Java code
What you need is an array of integers to hold the user input once it has been validated (i.e. converted to integers as you are doing with Integer.parseInt), a for loop to populate the array, and inside that for loop another while loop to validate the input and not move on to the next input until a valid input is received. Your average calculation at the end then needs to sum all the integers in the array and divide by the number of digits.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|