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