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