Advertisement
hiker43

matrix

Aug 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5.     const int redici = 3;
  6.     const int koloni = 3;
  7.     int matrica[redici][koloni];
  8.  
  9.     for(int i = 0; i < redici; i++)
  10.     {
  11.         for(int j = 0; j < koloni; j++)
  12.         {
  13.             std::cout<<"Vnesi element [" << i << "][" << j << "]: ";
  14.             std::cin >> matrica[i][j];
  15.         }
  16.     }
  17.  
  18.     for(int i = 0; i < redici; i++)
  19.     {
  20.         for(int j = 0; j < koloni; j++)
  21.         {
  22.             std::cout<< matrica[i][j] << " ";
  23.         }
  24.         std::cout << "\n";
  25.     }
  26.  
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement