apc_001.cpp ​
Metadata ​
- Author — Amit Dutta (amitdutta4255@gmail.com)
- Last updated — 18 Jun 2026
- License — MIT
Problem Statement ​
Problem Statement
Tring 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 num, count = 0;
cout << "Enter numbers one by one (enter -1 to stop):" << endl;
cin >> num;
while (num != -1) {
count++;
cin >> num;
}
cout << "Total numbers entered: " << count << endl;
return 0;
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16