You are viewing a single comment's thread. Return to all comments →
C++ solution without using array.
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int V, N, i; cin>>V>>N; N=0; while(cin>>i and i!=V) N++; cout<<N; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Intro to Tutorial Challenges
You are viewing a single comment's thread. Return to all comments →
C++ solution without using array.