
how can i count how many numbers enterd by the user so the output would be like this
Total number of Scores = ....
this is my code :-
import java.util.Scanner; public class SCORES { public static void main (String [] args) {
double sum;
double avarege;
int numberOfScores ; // number of scores entered by the user ..
int Scores;//scores entered by the user..
Scanner keyboard = new Scanner (System.in);
System.out.println("Pleas Enter a scores between 0 , 100 ..");
System.out.println("Whene you finish, enter negative number ..");// Dont forget to declare the negative number !!!!!!!!
Scores = keyboard.nextInt();
System.out.println("Now , I'll get the total Scores you've entered..");
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.