Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <iomanip>
- using namespace std;
- int main()
- {
- int x;
- cout << "Podaj wartosci tablicy dwuwymiarowej (t[x][x]): ";
- 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]=0;
- }
- else
- {
- tab[i][j]=1;
- }
- }
- }
- for (int i=0; i<x; i++)
- {
- for (int j=0; j<x; j++)
- {
- cout<<tab[i][j];
- }
- cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement