Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int x;
- cout << "Wprowadz rozmiar tablicy kwadratowej: ";
- cin >> x;
- int tab[x][x];
- for(int i=0;i<x;i++)
- {
- for(int j=0;j<x;j++)
- {
- if(i!=j)
- {
- tab[i][j]=1;
- cout << tab[i][j];
- }
- else if(i==j)
- {
- tab[i][j]=0;
- cout << tab[i][j];
- }
- }
- cout << "\n";
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment