Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static int valorInserido;
- static void Main(string[] args)
- {
- Console.WriteLine("Insira um valor positivo: ");
- valorInserido = int.Parse(Console.ReadLine());
- Console.Clear();
- if (valorInserido > 0)
- {
- for (int i = valorInserido - 1; i < 0; i--)
- {
- if (i % 2 == 0)
- Console.WriteLine("{0},", i);
- }
- }
- else
- Console.WriteLine("Erro. Insira um valor positivo e tente novamente.");
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement