Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n, p=0;
  8. cout<<"n=";
  9. cin>>n;
  10.  
  11. for( int i=1; i<n; n=(n/10))
  12. if ((n%10)%2==0)
  13. p=(p+1);
  14.  
  15. cout<<p ;
  16.  
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement