prac_001.cpp ​
Metadata ​
- Author — Amit Dutta (amitdutta4255@gmail.com)
- Last updated — 18 Jun 2026
- License — MIT
Problem Statement ​
Problem Statement
Trying to remember after a year.
Source Code ​
Printing the code
To print this file, open it on GitHub and click Raw before printing, or use the Download Raw button above and print directly from that page.
cpp
#include <iostream>
using namespace std;
int main() {
int n;
cout << "Enter a number: ";
cin >> n;
for (int i = 1; i <= n; i++) {
cout << i << " ";
}
cout << endl;
return 0;
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15