Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- /* Write a program that reads from the console
- * a positive integer number N (N < 20) and outputs a matrix
- */
- class Matrix
- {
- static void Main()
- {
- Console.WriteLine("Enter how big matrix want: ");
- int n = int.Parse(Console.ReadLine());
- int count = 1;
- for (int i = 1; i <= n ; i++)
- {
- for (int j = count; j < n + count; j++)
- {
- Console.Write("{0,3}",j);
- }
- Console.WriteLine();
- count++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement