Hi everybody,
Here I come again. I feel so stuck... I'm faced with a coding exercise, the solution to which, I'm unable to find even after trying to break my head onto the wall....
The problem is that this is more of a beginner's exercise and as such I'm allowed to only use if statements!
Following is the thing:-
Q. According to the Gregorian calendar, it was Monday on the date 01/01/01. If any year is input through the keyboard, write a program to find out what is the day on 1st of January of the year input.
And, below is some scribbling that I tried. But, my head seems to go blank after that...
Thanks in Advance for your help.Code:/* Determination of Day on 01-01 */ #include<stdio.h> int main() { int year, Day; printf("\nEnter a Year: "); scanf("%d",&year); Day = /* Doomsday Algorithm, maybe... or Zeller's Congruence... aaah... forget it...*/ }