fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int n;
  7. cin >> n;
  8.  
  9. int i=1;
  10. while (i<=n){
  11. cout << i << " ";
  12. i++;
  13. }
  14. cout << endl;
  15.  
  16. for(int j=1; j<=n; j++){
  17. cout << j << " ";
  18. }
  19.  
  20. cout << endl;
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0.01s 5288KB
stdin
25
stdout
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25