title: Check with day is it by date (Sunday,Monday)
body: <p>i am trying to make a program that you insert day , month , year ... and its said witch day is it (sunday,monday.....) i make that but that sometimes working and sometimes not.. try you for the help !!</p>
  
  <p>(i need to do it only on java not use date system functions or someting like that) </p>
  
  <pre><code>Scanner scan = new Scanner(System.in);  
  
  System.out.println("Enter Today Day : ");
  int day = scan.nextInt();
  System.out.println("Enter Today Month : ");
  int dayMonth = scan.nextInt();
  System.out.println("Enter Today Year : ");
  int year = scan.nextInt();
  
  String[] days = {"Friday","Saturday", "Sunday","Monday", "Tuesday", "Wednesday", "Thursday","Friday" };
  int howManyDays = (year-1916)*365 + dayMonth + day ;  
  int whatDay = howManyDays%7;
  System.out.println(days[whatDay]);
  </code></pre>