Advertisement
Guest User

Mod

a guest
Oct 4th, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(int argc , char *argv[]){
  5.     int  y ,z;
  6.     scanf ("%d",y);
  7.     if (y>=1901 || y<=2013){
  8.  
  9.         if (y%4==0 || y%400){
  10.             // This says: If the year is divisible by 4 OR the year is not divisible by 400.
  11.             printf ("Tuesday\n");
  12.         }else if(y%100==0){
  13.             printf("Thursday\n");
  14.         }
  15.     }
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement