Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp16
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("Ilosc wierszy w tablicy postrzepionej:");
  14. int c = int.Parse(Console.ReadLine());
  15. int [][] tablica = new int[c][];
  16. for(int x = 0; x < c; x++)
  17. {
  18. Console.WriteLine("podaj ilosc elementow w tablicy{0}", x);
  19. int ele = int.Parse(Console.ReadLine());
  20. for (int g = 0; g < ele; g++)
  21. {
  22. Console.WriteLine("Podaj element tablicy:");
  23. tablica[x][g] = Convert.ToInt32(Console.ReadLine());
  24. }
  25. }
  26.  
  27. for (int x = 0; x < tablica.Length; x++)
  28. {
  29. for (int xx = 0; xx < tablica[x].Length; xx++)
  30. {
  31. Console.Write(" " + tablica[x][xx]);
  32. }
  33. Console.WriteLine();
  34. }
  35. Console.ReadKey();
  36. }
  37.  
  38.  
  39.  
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement