edutedu

problema 31

Jun 11th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. int a[100][100], n, i, j, k,m;
  2. cin>>n>>m;
  3. for(i=1; i<=n; i++)
  4. {
  5. k=i;
  6. for(j=1; j<=m; j++)
  7. {
  8. a[i][j]=k;
  9. k++;
  10. }
  11. }
  12. for(i=1;i<=n;i++)
  13. {
  14. for(j=1;j<=m;j++)
  15. cout<<a[i][j]<<" ";
  16. cout<<endl;
  17. }
Add Comment
Please, Sign In to add comment