Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //найти сумму элементов массива
- int[] sum = new int[3] { int.Parse(Console.ReadLine()), int.Parse(Console.ReadLine()), int.Parse(Console.ReadLine()) };
- int a = 0;
- foreach (int i in sum)
- {
- a = a + i;
- };
- Console.WriteLine(a);
- Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement