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