Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace IMJunior
- {
- class Program
- {
- static void Main(string[] args)
- {
- int summ2 = 0;
- int proizv1 = 1;
- int[,] A = { { 1, 2, 3 },
- { 4, 5, 6 },
- { 7, 8, 9 } };
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < 3; j++)
- {
- Console.Write(A[i, j] + " ");
- if (i == 1)
- {
- summ2 += A[i, j];
- }
- if (j == 0)
- {
- proizv1 =proizv1* A[i, j];
- }
- }
- Console.WriteLine();
- }
- Console.WriteLine("Сумма второй строки равна: "+summ2);
- Console.WriteLine("Произведение первого столбца равно: " + proizv1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment