Java basics 13 and java basics 13
Import java. util. Equals; public class Thirtheen {/* enter a day of the year, month, or day, to determine whether the Day is the day of the year? */Public static void main (String [] args) {callback input = new callback (System. in); int sum, I; System. out. print ("Enter the year:"); int a = input. nextInt (); System. out. print ("\ n"); System. out. print ("Enter the month:"); int B = input. nextInt (); System. out. print ("\ n"); System. out. print ("Enter the day:"); int c = input. nextInt (); System. out. print ("\ n"); if (a % 4 = 0 & a % 100! = 0 & B> 1) sum = 29; else if (B> 1) sum = 28; elsesum = 0; for (I = 1; I <B; I ++) {if (I = 2) continue; switch (I) {case 1: case 3: case 5: case 7: case 8: case 10: case 12: sum = sum + 31; case 4: case 6: case 9: case 11: sum = sum + 30;} sum = sum + c; System. out. println ("to" + a + "year" + B + "month" + c + "day" + ", "+ a +" years passed "+ sum +" days ");}}