Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, p=0;
- cout<<"n=";
- cin>>n;
- for( int i=1; i<n; n=(n/10))
- if ((n%10)%2==0)
- p=(p+1);
- cout<<p ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement