Wednesday, August 23, 2017

1065 Even Between five Numbers URI Problem Only Solution in C#


using System;

class URI {

    static void Main(string[] args) {

       int A=Convert.ToInt32(Console.ReadLine());
       int B=Convert.ToInt32(Console.ReadLine());
       int C=Convert.ToInt32(Console.ReadLine());
       int D=Convert.ToInt32(Console.ReadLine());
       int E=Convert.ToInt32(Console.ReadLine());
      
       int count=0;
       if(A%2==0)
       {
           count++;
       }
       if(B%2==0)
       {
           count++;
       }
       if(C%2==0)
       {
           count++;
       }
       if(D%2==0)
       {
           count++;
       }
       if(E%2==0)
       {
           count++;
       }
       Console.WriteLine(count+" valores pares");
    }

}

No comments:

Post a Comment