fork download
  1. // Level 1 - Homework 1 - Question A - Solution 1.
  2. #include <iostream>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int N = 0;
  10. cin >> N;
  11.  
  12. for(int i = 1; i <= N; i++)
  13. cout << i << endl;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 5304KB
stdin
5
stdout
1
2
3
4
5