rygyfygy

DO DOKOŃCZENIA TAB DWUWYMIAROWE

Nov 8th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.  
  6. const int n=10;
  7.  
  8. int i,j,suma,macierz[n][n];
  9.  
  10. for(i=0;i<n;i++)//wpisywanie do tablicy
  11. {
  12. for(j=0;j<n;i++)
  13. {if (i==j)
  14. macierz[i][j]=1;
  15. else
  16. macierz[i][j]=0;
  17. }}
  18.  
  19. for(i=0;i<n;i++)
  20. {for(j=0;j<n;i++)
  21. {
  22. cout<<macierz[i][j]<<" ";
  23.  
  24. }cout<<endl;
  25. }
  26.  
  27. suma=0;
  28. cout<<endl;
  29. for(i=0;i<n;i++)
  30. {
  31. }
  32.  
  33.  
  34. return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment