I am writing a simple program to calculate the average of a set of numbers. You get the numbers using Scanner, so I am using while loop with .has
Scanner
while
.has
public static void main(String[] args){ Scanner Input = new Scanner(System.in); System.out.println("Enter # to end "); while( !Input.hasNextInt("#"))// return true if u input value = its argument { //ur code }//end while