Skip to content

Commit

Permalink
That's Odd... - C# Implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
iamstan13y authored Dec 31, 2021
1 parent 10c72c5 commit 40ee9ba
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Sololearn CodeCoach Challenges/C#/ThatsOdd.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace SoloLearn
{
class Program
{
static void Main(string[] args)
{
int N = int.Parse(Console.ReadLine());
int[] shit = new int[N];
for (int i = 0; i < N; i++){
shit[i] = int.Parse(Console.ReadLine());
}
int sum = 0;
foreach (int num in shit){
if (num % 2 == 0){
sum+=num;
}
}

Console.WriteLine(sum);
}
}
}

0 comments on commit 40ee9ba

Please sign in to comment.