usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;namespaceconsoleapplication1{classProgram {Static voidMain (string[] args) { while(true) {Console.Write ("Please enter the year:"); intYear =int. Parse (Console.ReadLine ()); Console.Write ("Please enter the month:"); intYue =int. Parse (Console.ReadLine ()); Console.Write ("Please enter the date:"); intRiqi =int. Parse (Console.ReadLine ()); if(Year >0&& Year <9999) { if(Yue = =1|| Yue = =3|| Yue = =5|| Yue = =7|| Yue = =8|| Yue = =Ten|| Yue = = A) { if(Riqi >0&& Riqi <= to) {Console.WriteLine ("you entered the correct date, please continue to work! "); } Else{Console.WriteLine ("Please enter the correct date, thank you. "); } } Else if(Yue = =4|| Yue = =6|| Yue = =9|| Yue = = One) { if(Riqi >0&& Riqi <= -) {Console.WriteLine ("you entered the correct date, please continue to work! "); } Else{Console.WriteLine ("Please enter the correct date, thank you. "); } } Else if(Yue = =2) { if(Year% -==0|| (Year%4==0&& Year% -!=0)) { if(Riqi >0&& Riqi <= in) {Console.WriteLine ("you entered the correct date, please continue to work hard"); } Else{Console.WriteLine ("Please enter the correct date, thank you. "); } } Else { if(Riqi >0&& Riqi <= -) {Console.WriteLine ("you entered the correct date, please continue to work hard"); } Else{Console.WriteLine ("Please enter the correct date, thank you. "); } } } Else{Console.WriteLine ("Please enter the correct date, thank you. "); } } Else{Console.WriteLine ("Please enter the correct date, thank you. "); } console.readline (); } } }}
Determine whether the date is correct