Advertisement
ntamas

órai dec. 2.

Dec 2nd, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace orai1202
  7. {
  8.   class Program
  9.   {
  10.     static void tombfeltolt(int[,] tomb)
  11.     {
  12.       for (int j = 0; j < 10; j++ )
  13.       {
  14.         for (int i = 0; i < 10; i++)
  15.         {
  16.           tomb[j, i] = (j+1)* (i + 1);
  17.         }  
  18.       }
  19.     }
  20.  
  21.     static void Main(string[] args)
  22.     {
  23.       int[,] tomb = new int[10, 10];
  24.       tombfeltolt(tomb);
  25.       for (int i = 0; i < 10; i++ )
  26.       {
  27.         for (int j = 0; j < 10; j++ )
  28.         {
  29.           Console.Write("{0,3} ", tomb[j, i]);
  30.         }
  31.         Console.WriteLine();
  32.       }
  33.       Console.ReadKey();
  34.     }
  35.   }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement