Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. unsigned short m,n;
  6. cin>>m>>n;
  7. unsigned matrice[20][20];
  8. unsigned impar = 1;
  9. for(unsigned short l = m-1;l>=0;--l)
  10. for(unsigned short c = n-1;c>=0;--c)
  11. {
  12. while(impar%3==0)impar+=2;
  13. matrice[l][c] = impar;
  14. impar+=2;
  15. }
  16. for(unsigned short l = 0;l<m;++l)
  17. {
  18. for(unsigned short c = 0;c<n;++c)cout<<matrice[l][c]<<' ';
  19. cout<<'\n';
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement