Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ExamTasks
- {
- class Program
- {
- static void Main(string[] args)
- {
- int x = int.Parse(Console.ReadLine());
- int[,] matrix = new int[10, 10];
- matrix[0, 0] = 1;
- matrix[9, 9] = 1;
- for (int i = 1; i < 10; i++)
- {
- matrix[0, i] = matrix[0, i - 1] * x;
- matrix[i, 0] = matrix[i - 1, 0] * x;
- matrix[9, 9 - i] = matrix[9, 10 - i] * x;
- matrix[9 - i, 9] = matrix[10 - i, 9] * x;
- }
- for (int i = 0; i < 10; i++)
- {
- for (int j = 0; j < 10; j++)
- Console.Write(matrix[i, j] + "\t");
- Console.WriteLine("");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement