using System;
using System.Linq;
namespace Prog
{
public class Program
public static void Main(string[] args)
String str = "15 0 87 2 34";
String[] nums = str.Split(' ');
var evenNumbers = nums.Where(i => Convert.ToInt32(i) % 2 == 0);
foreach (String i in evenNumbers)
Console.WriteLine(i);
}
Подробнее - на Znanija.com - znanija.com/task/30617450#readmore
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
using System;
using System.Linq;
namespace Prog
{
public class Program
{
public static void Main(string[] args)
{
String str = "15 0 87 2 34";
String[] nums = str.Split(' ');
var evenNumbers = nums.Where(i => Convert.ToInt32(i) % 2 == 0);
foreach (String i in evenNumbers)
Console.WriteLine(i);
}
}
}
Подробнее - на Znanija.com - znanija.com/task/30617450#readmore