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.RegularExpressions;
- namespace Rextester
- {
- public class Program
- {
- public static void Main(string[] args)
- {
- //Your code goes here
- int[][] a=new int[3][];
- for(int i=0;i<3;i++) a[i]=new int[3];
- for(int i=0;i<3;i++) for(int j=0;j<3;j++) a[i][j]=i+2;
- Console.WriteLine("A^T:");
- int[][] b=new int[3][];
- for(int i=0;i<3;i++) b[i]=new int[3];
- for(int i=0;i<3;i++) { for(int j=0;j<3;j++) { b[i][j]=a[j][i]; Console.Write(b[i][j]+" "); } Console.WriteLine(); }
- Console.WriteLine("A*A^T");
- int[][] c=new int[3][];
- for(int i=0;i<3;i++) c[i]=new int[3];
- for(int i=0;i<3;i++) {
- for(int j=0;j<3;j++) {
- int sum=0;
- for(int k=0;k<3;k++) sum+=a[i][k]*b[k][j];
- c[i][j]=sum;
- Console.Write(c[i][j]+" ");
- }
- Console.WriteLine();
- }
- bool check=true;
- for(int i=0;i<3;i++) if(c[i][i]!=1) { check=false; break; }
- if(!check) Console.WriteLine("не ортогональная");
- else Console.WriteLine("ортогональная");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement