i have an assignment in which a user enters a date in dd/mm/yy format and the program must output what day of the week that date is.
I use 3 different variables to get the values of dd,mm and yy
Scanner scanner = new Scanner(System.in); System.out.println("ENTER THE DAY. NOTE :PLEASE DONT ADD '0' IF THE DAY IS SINGLE DIGIT LIKE 1 TO 9"); int day = scanner.nextInt(); System.out.println("ENTER THE MONTH NOTE :PLEASE DONT ADD '0' IF THE MONTH IS SINGLE DIGIT LIKE 1 TO 9"); int month = scanner.nextInt(); System.out.println("ENTER THE YEAR"); int year = scanner.nextInt();
I am not allowed to use the calendar util. only basic things like switch, scanner,for, while etc.
i know how to find if a year is a leap year or not, but what should i do next?? can someone please help me on this