Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. #include "iomanip"
  4. using namespace std ;
  5.  
  6. int main() {
  7. int n, x, count = 1;
  8. cin >> n;
  9. int a[n][n];
  10. for (int i = 0; i < n; i++)
  11. for (int j = 0; j < n; j++)
  12. a[i][j] = i * j;
  13.  
  14. for (int i = 1; i < n; i++){
  15. for (int j = 1; j < n; j++)
  16. cout << setw(4) << a[i][j] << ' ';
  17. cout << endl;
  18. }
  19. return 0;
  20. }
  21. // 1 2 3 3 4 5 7 8 9 0
  22. // 0 9 8 7 6 5 4 3 2 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement