okay na paps.. na lagyan konaBaka hindi mo nailagay si Scanner, nagbase lang kasi ako sa sinend mo eh
Pero eto boss sure nato triny ko na para sayo.
Code:import java.util.*; public class Main { public static void main(String[] args) { Scanner input = new Scanner (System.in); char rep; char repnum; int loop; do{ int jeff = 0; int counter = 0; float ave; System.out.println("How many numbers that you want to add?"); loop = input.nextInt(); do{ for (int x = 0;loop > x;x++){ System.out.println("Input any number you want to add"); int jeff2 = input.nextInt(); jeff += jeff2; counter += 1; } System.out.println("Do you want to add another number?\nY - Yes\nN - No\n"); repnum = input.next().charAt(0); }while(repnum == 'Y' || repnum == 'y'); ave = jeff / counter; System.out.println("Sum is : " + jeff); System.out.println("Average is : " + ave); System.out.println("\n\nDo you want to get another average?\nY - Yes\nN - No\n"); rep = input.next().charAt(0); }while(rep == 'Y' || rep == 'y'); } }