belongs to collection: all conditional programs in c# language
Write C# Program to check leap year using conditional operator.
I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..
static void Main(string args)
year = Convert.ToInt32(Console.ReadLine());
Console.WriteLine( year % 4 == 0 ? "Entered year is a leap" : "Not leap year");
Not leap year
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.