Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int x,y,i,j,t[100][100],k,a;
  6. cout<<"Podaj wymiary tablicy: ";
  7. cin>>x;
  8. cin>>y;
  9. cout<<"Podaj wymiary K: ";
  10. cin>>k;
  11. cin>>a;
  12. for(i=1;i<=x;i++)
  13. for(j=1;j<=y;j++)
  14. {
  15.  
  16. if((i>=x) && (j>=y))
  17. t[i][j]=0;
  18. else
  19. t[i][j]=1;
  20. }
  21. for(i=1;i<=x;i++)
  22. {
  23.  
  24. for(j=1;j<=y;j++)
  25. cout<<t[i][j]<<" ";
  26. cout<<endl;
  27. }
  28. return 0;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement