iliya87

02.CheatSheet

Mar 24th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.80 KB | None | 0 0
  1. using System;
  2.  
  3. class CheatSheet
  4. {
  5.     static void Main(string[] args)
  6.     {
  7.         int rows = int.Parse(Console.ReadLine());
  8.         int columns = int.Parse(Console.ReadLine());
  9.         long verticalStart = long.Parse(Console.ReadLine());
  10.         long horizontalStart = long.Parse(Console.ReadLine());
  11.  
  12.         for (int i = 0; i < rows; i++)
  13.         {
  14.             string clearWhiteplace = "";   // Махаме празните пространства
  15.             for (int j = 0; j < columns; j++)
  16.             {
  17.                 long currentValue = (verticalStart + i) * (horizontalStart + j);
  18.                 clearWhiteplace += currentValue + " ";
  19.             }
  20.             Console.WriteLine(clearWhiteplace.Trim());   // Махаме празните пространства
  21.         }
  22.  
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment