csansoon

P6.05 P89078 First position

Nov 7th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5.  
  6. int main() {
  7.     int n, pos=1;
  8.     while (cin>>n&&n%2!=0) pos++;
  9.     cout<<pos<<endl;
  10. }
Add Comment
Please, Sign In to add comment