using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static void Main(string[] args) { int vegosszeg = 0; for (int i = 0; i < tombb.Length; i++) { tombb[i] = r.Next(10,50); if (tombb[i] % 2 == 0) { vegosszeg += tombb[i]; } } foreach (int darab in tombb) { Console.Write(","+darab); } Console.WriteLine(); Console.Write(vegosszeg); Console.ReadKey(); } } }