while(true) {Console.Write ("Please enter the year:"); intA =int. Parse (Console.ReadLine ()); Console.Write ("Please enter the month:"); intb =int. Parse (Console.ReadLine ()); Console.Write ("Please enter the date:"); intc =int. Parse (Console.ReadLine ()); intD; if(A >9999|| A <1759|| b <=0|| B > A|| C <=0|| C > to|| (b = =4|| b = =6|| b = =9|| b = = One) && C > -) {Console.WriteLine ("the date you entered is incorrect"); } Else { ifA -==0|| A -!=0&& A%4==0)) { if(b <2) {D=C; Console.WriteLine ("This is the first year of the"+ D +"days"); } if(b = =2) { if(C > in) {Console.WriteLine ("the date you entered is incorrect"); } Else{d= C + to; Console.WriteLine ("This is the first year of the"+ D +"days"); } } if(B >2&& B <8) { if(b%2==0) {D= b/2* to+ (b/2-2) * -+ in+C; Console.WriteLine ("This is the first year of the"+ D +"days"); } if(b%2!=0) {D= (b-1) /2* to+ ((b-1) /2-1) * -+ in+C; Console.WriteLine ("This is the first year of the"+ D +"days"); } } if(b >=8) { if(b%2==0) {D= (b-8) /2* to+ (b-8) /2* -+ to*4+ -*2+ in+C; Console.WriteLine ("This is the first year of the"+ D +"days"); } Else{d= (b-7) /2* to+ ((b-7) /2-1) * -+ to*4+ -*2+ in+C; Console.WriteLine ("This is the first year of the"+ D +"days"); } } } Else { if(b <2) {D=C; Console.WriteLine ("This is the first year of the"+ D +"days"); } if(b = =2) { if(C > -) {Console.WriteLine ("the date you entered is incorrect"); } Else{d= C + to; Console.WriteLine ("This is the first year of the"+ D +"days"); } } if(B >2&& B <8) { if(b%2==0) {D= b/2* to+ (b/2-2) * -+ -+C; Console.WriteLine ("This is the first year of the"+ D +"days"); } Else{d= (b-1) /2* to+ ((b-1) /2-1) * -+ -+C; Console.WriteLine ("This is the first year of the"+ D +"days"); } } if(b >=8) { if(b%2==0) {D= (b-8) /2* to+ ((b-8) /2) * -+ to*4+ -+ -*2+C; Console.WriteLine ("This is the first year of the", C +"days"); } Else{d= (b-7) /2* to+ ((b-7) /2-1) * -+ to*4+ -+ -*2+C; Console.WriteLine ("This is the first year of the"+ D +"days"); } } } } }
Enter month and date, and how many days of the year is the output of this day