Advertisement
Schnuk

688

Jan 17th, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace ExamTasks
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             int n = int.Parse(Console.ReadLine());
  12.             double[] a = new double[n];
  13.             for (int i = 0; i < n; i++)
  14.                 a[i] = double.Parse(Console.ReadLine());
  15.             double[,] matrix = new double[n, n];
  16.             for (int i = 0; i < n; i++)
  17.             {
  18.                 for (int j = 0; j < n; j++)
  19.                 {
  20.                     matrix[i, j] = a[(j + i) % n];
  21.                     Console.Write(matrix[i, j] + "\t");
  22.                 }
  23.                 Console.WriteLine("");
  24.             }
  25.         }
  26.     }
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement