Untitled
unknown
c_cpp
a year ago
306 B
0
Indexable
Never
#include <iostream> #include <cmath> using namespace std; int main() { int a,past,count = 0; bool running = true; cin >> a; past = -3572349; while(running) { if (past == 0 && a == 0) { break; } else{ count += a; past = a; } cin >> a; } cout << count; }