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
12
concurrentStack
okok2
Main2
condicional "?"
biswa
linq sort
edszfcfsefer
Create URL Safe and Cryptographically Strong Short GUID
ADSA - Tuto 1 - Exo4 - b - Proposition d'algo en O(n)