Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int n,r,sum=0,temp;
- scanf("%d",&n);
- temp=n;
- while(temp!=0)
- {
- r=temp%10;
- if(r%2!=0){
- sum=sum*10+r;}
- temp=temp/10;
- }
- int r1,s=0,temp1;
- temp1=sum;
- while(temp1!=0)
- {
- r1=temp1%10;
- s=s*10+r1;
- temp1=temp1/10;
- }
- printf("%d",s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement