I am hoping it looks like this:
Lottery analysis
How many days will you analyze? 5
Day 1: 123
Day 2: 1234
too many digits
Day 2: abc
non-numeric data
Day 2: 456
Day 3: 789
Day 4: 012
Day 5: 345
Frequencies
0: 1
1: 2
2: 2
3: 2
4: 2
5: 2
6: 1
7: 1
8: 1
9: 1
public static void main(String[] args) {
System.out.println("Lottery Analysis\n");
// Create Scanner
Scanner days = new Scanner(System.in);
// Ask the user for how many days they will analyze
System.out.print("How many days will you analyze? ");
int analyze = days.nextInt();
// Ask the user to enter 3 digits for each day
System.out.println("\nEnter 3 digits for each day \n");
Scanner scanDigits = new Scanner(System.in);
int i = 1;
// Make a loop that prints the number of days so the user can input the digits each time into that day
String digits3;
do {
System.out.print("Day " + i + ": ");
digits3 = scanDigits.nextLine();
// Make sure the string used holds only 3 digits
if (isNumeric(digits3)) {
i++;
// Store all digits used in digits3 in an array
int[] frequencies = new int[10];
int val = Character.digit(digits3.charAt(0),10);
}
}
while (i <= analyze);
// Print the Numbers and Frequencies from 0 to 9
System.out.println("\nFrequencies\n");
System.out.println(val);
}
public static boolean isNumeric(String digits3)
{
boolean ret = !digits3.equals("");
for(int i = 2; i < digits3.length(); i++)
{
// Checks if the characters in digits3 are only digits
if (!Character.isDigit(digits3.charAt(i)))
{
System.out.println("non-numeric data");
ret = false;
}
}
// Tells the user if the characters they input are not over 3 digits
for (int j = 3; j < digits3.length(); j++)
{
System.out.println("too many digits");
ret = false;
}
return ret;
}