Advertisement
miljdze

Untitled

Dec 14th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication170
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. int[,] matrica = new int[3, 3];
  13. Console.WriteLine("Unesite elemente u matricu: ");
  14. // UNOS ELEMENATA UNAZAD
  15. for (int i = matrica.GetLength(0) - 1; i >= 0; i--)
  16. {
  17. for (int j = matrica.GetLength(1) - 1; j >= 0; j--)
  18. {
  19. matrica[i, j] = int.Parse(Console.ReadLine());
  20. }
  21.  
  22. }
  23. // ISPIS ELEMENATA
  24. for (int i = 0; i < matrica.GetLength(0); i++)
  25. {
  26. for (int j = 0; j < matrica.GetLength(1); j++)
  27. {
  28. Console.Write(matrica[i, j] + " ");
  29. }
  30. Console.WriteLine();
  31. }
  32. Console.ReadKey();
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement