Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main ()
- {
- int x,x2=0,p=1,cif;
- cin>>x;
- do
- {
- cif=x%10;
- if(cif==2 || cif==3 || cif==5 || cif==7)
- {
- x2=x2+x%10*p;
- p=p*10;
- }
- else
- {
- x2=x2;
- }
- x=x/10;
- } while(x!=0);
- cout<<x2;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement