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;
- namespace ConsoleApplication3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int x = 4;
- int y = 4;
- int[,] matice = new int[x, y];
- matice[1, 1] = 3;
- matice[1, 2] = 6;
- matice[1, 3] = 6;
- matice[2, 1] = 3;
- matice[2, 2] = 3;
- matice[2, 3] = 3;
- matice[3, 1] = 12;
- matice[3, 2] = 6;
- matice[3, 3] = 6;
- int n = 3;
- for (int i=1; i <=3; i++)
- {
- for (int j=1; j<=3; j++)
- {
- Console.Write(matice[i,j]);
- }
- Console.WriteLine();
- }
- for (int j = 1; j <= 3;j++ )
- {
- int pom = matice[j, j];
- if (! ((matice[j, j] == 1) || (matice[j, j] == 0)))
- {
- for (int i = 1; i <= 3;i++ )
- {
- matice[j, i] = matice[j, i] / pom;
- }
- } else
- {
- if (matice [j,j] == 0)
- {
- for (int i = j+1; i<=3;i++)
- {
- if (!(matice [j,i]==0))
- {
- }
- }
- }
- }
- }
- for (int i = 1; i <= 3; i++)
- {
- for (int j = 1; j <= 3; j++)
- {
- Console.Write(matice[i, j]);
- }
- Console.WriteLine();
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement