Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Задание_3
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int[] arr = { 2, 4, -6, 1, 0, 12, 5, -1, 9, 10 };
- Console.WriteLine("Последовательность чисел: ");
- for (int i = 0; i < arr.Length; i++)
- {
- Console.Write(arr[i] + " ");
- }
- int sum = 0;
- for (int i = 0; i < arr.Length; i++)
- {
- sum += arr[i];
- }
- Console.WriteLine("\nСумма: " + sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment