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