My objective: write an application that uses while loop to get 20 inputs from a user and displays the sum of all those numbers.
I get how to do the while loop but I don't know how to get the sum of all those numbers (because the variable will be the same). Here is what I have so far:
Scanner Numb = new Scanner (System.in);
int count = 0;
while (count<20) {
System.out.println("Enter number: ");
int numb = Numb.nextInt();
count++;
getSum(i[])function. Then you can create test-data without having to enter...in...all...twenty...numbers...every...SINGLE...time... Ugh.