Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Leapyear
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { bool t; int y; string str; str=Console.ReadLine(); y=int.Parse(str); t=leapme(y); Console.WriteLine("Leapyear " + str + "? = " + t.ToString()); } private static bool leapme(int leapyear) { bool IsLeapyear = false; if (leapyear % 400 == 0) { IsLeapyear = true; } else if ((leapyear % 4 == 0) && (leapyear % 100 !=0)) { IsLeapyear = true; } return IsLeapyear; } } }
run
|
edit
|
history
|
help
0
ref variables/parameters
D112
Daimone
C# queue
Validate or get the check digit of a segment of a Windows 8 / 10 activation installation ID
shuffle2
Palindrome 1
งานสอบ
cpp contact book
XmlException in XmlSerializer.Deserialize when XML has \0