eolymp
bolt
Try our new interface for solving problems
published at 4/8/24, 11:38:53 am

/**************************

Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world.

*************************/

include <iostream>

include <cmath>

using namespace std; int main() { int n,say; say=0; while(cin>>n){ say++;

} cout<<say-1; }

published at 4/8/24, 6:19:04 pm

include <iostream>

include <cmath>

using namespace std; int main() { int num,say; say=0; while(cin>>num) { say++;

} cout<<say-1; }

published at 4/8/24, 6:20:11 pm

include <iostream>

int main() { int sequence[20]; // int num, count = 0;

for (int i = 0; i < 20; ++i) {
    std::cin >> num;
    if (num == 0) { 
        break;
    }
    sequence[i] = num;
    count++; 
}


std::cout << count << std::endl;

return 0;

}

published at 4/12/24, 3:16:17 pm

include <bits/stdc++.h>

using namespace std; int main() { int n,say; say=0; while(cin>>n) { say++; } cout<<say-1; }