Array HW -Übung
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
int sum = 0;
int mult = 1;
int[] numbers = new int[10];
Console.WriteLine("Input ten numbers:");
for(int i = 0; i<numbers.Length; i++)
{
numbers[i] = Convert.ToInt32(Console.ReadLine());
}
Console.WriteLine("Here is your output:");
for (int i = 0; i < numbers.Length; i++)
{
Console.WriteLine(numbers[i]);
}
Console.WriteLine("Even Number sum:");
for (int i = 0; i < numbers.Length; i++)
{
if (i % 2 != 1)
{
sum = sum + numbers[i];
}
}
Console.WriteLine(sum);
Console.WriteLine("multiplication of array:");
for (int i = 0; i < numbers.Length; i++)
{
mult *= numbers[i];
}
Console.WriteLine(mult);
}
}
}
Breakable Boar