apc_001.cpp (479B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 18 Jun 2026 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* Tring to remember after a year. */ 8 9 #include <iostream> 10 using namespace std; 11 12 int main() { 13 int num, count = 0; 14 cout << "Enter numbers one by one (enter -1 to stop):" << endl; 15 16 cin >> num; 17 while (num != -1) { 18 count++; 19 cin >> num; 20 } 21 22 cout << "Total numbers entered: " << count << endl; 23 return 0; 24 }