Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[][] a = new int[3][];
- for (int i = 0; i < 3; i++) a[i] = new int[3];
- int number = 1;
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 3; j++) {
- a[i][j] = number;
- number++;
- Console.Write(a[i][j]+" ");
- }
- Console.WriteLine();
- }
- Console.Write("Введите номер столбца: ");
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i < 3; i++) {
- Console.WriteLine(a[i][n]+"*(-1)^"+(i+n)+"*");
- for (int j = 0; j < 3; j++) {
- if (j != i) {
- for (int k = 0; k < 3; k++) {
- if (k!=n) Console.Write(a[j][k]+" ");
- }
- Console.WriteLine();
- }
- }
- if(i!=2) Console.WriteLine("+");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement