Advertisement
mateusssad

Exercicio 1 - Segunda Aula

Feb 19th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace exercicio.teste
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int ano;
  14.  
  15.             Console.WriteLine("Digite um ano: ");
  16.             ano = int.Parse(Console.ReadLine());
  17.  
  18.             if (((ano % 4 == 0) && (ano % 100 != 0)) || (ano % 400 == 0))
  19.             {
  20.                 Console.WriteLine("Ano " + ano + " bissexto");
  21.                 Console.ReadLine();
  22.             }
  23.             else
  24.             {
  25.                 Console.WriteLine("Ano " + ano + " n bissexto");
  26.                 Console.Read();
  27.             }
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement