package lab333; import java.util.Scanner; public class Lab3 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter a year: "); int year = input.nextInt(); System.out.println("Enter a month: "); int month = input.nextInt(); System.out.println("Enter a day: "); int day = input.nextInt(); if(month == 1) { month = 13; year = year -1; } else if (month== 2) { month = 14 ; year = year - 1 ; } int j = year/100; int k = year%100; int h = (day + 26*(month+1)/10 + k + k / 4 + j / 4 + 5*j)%7; switch(h) { case 0 : System.out.println("Girilen gün cumartesi."); break; case 1 : System.out.println("Girilen gün pazar."); break; case 2 : System.out.println("Girilen gün pazartesi."); break; case 3 : System.out.println("Girilen gün salı."); break; case 4 : System.out.println("Girilen gün çarşamba."); break; case 5 : System.out.println("Girilen gün perşembe ."); break; case 6 : System.out.println("Girilen gün cuma."); break; } } }