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 ForZakaz2
- {
- //5A-4BC;
- class Program
- {
- static void Main(string[] args)
- {
- int n = 2;
- int[,] A = new int[n,n];
- int[,] B = new int[n,n];
- int[,] C = new int[n,n];
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < n; j++)
- {
- A[i,j] = 3;
- B[i,j] = 2;
- C[i,j] = 2;
- }
- }
- Console.WriteLine("A : ");
- Console.WriteLine(" ");
- Print(A);
- Console.WriteLine(" "); Console.WriteLine("B : ");
- Console.WriteLine(" ");
- Print(B);
- Console.WriteLine(" "); Console.WriteLine("C : ");
- Console.WriteLine(" ");
- Print(C);
- Console.WriteLine(" ");
- Console.WriteLine("Результат 5A-4BC ");
- Console.WriteLine(" ");
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < n; j++)
- {
- Console.Write((5 * A[i, j] - 4 * B[i, j] * C[i, j]) + " ");
- }
- Console.WriteLine(" ");
- }
- }
- static void Print(int[,] a)
- {
- for (int i = 0; i < 2; i++)
- {
- for (int j = 0; j < 2; j++)
- {
- Console.Write( a[i,j] + " ");
- }
- Console.WriteLine(" ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment