fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. int n;
  7. cin >> n;
  8. for (int i = 1; i <= n; i++) {
  9.  
  10. for (int j = 1; j <= n; j++) {
  11. cout << i << " ";
  12. cout << j;
  13. }
  14.  
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 544KB
stdin
6
stdout
1 11 21 31 41 51 62 12 22 32 42 52 63 13 23 33 43 53 64 14 24 34 44 54 65 15 25 35 45 55 66 16 26 36 46 56 6