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