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;
- using System.Threading.Tasks;
- namespace harel
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Please write a number between 1 - 10: ");
- int number = int.Parse(Console.ReadLine());
- int column = 1;
- // first row
- Console.Write("x");
- for (int i = 1; i <= number; i++)
- {
- Console.Write("{0,5}", i);
- }
- Console.WriteLine("");
- Console.WriteLine("");
- for (int row = 1; row <= number; row++)
- {
- column = 1;
- Console.Write("{0}", row);
- for (column = 1; column <= number; column++)
- {
- Console.Write("{0,5}", row * column);
- }
- Console.WriteLine("");
- Console.WriteLine("");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement