#include<stdio.h> void fun(long s,long *t) { int d; long s1=1; *t=0; while(s>0) { d=s%10; if(d%2!=0) {*t=d*s1+*t; s1*=10; } s/=10; } } void main() { long s,t; printf("\nPlease enter:"); scanf("%ld",&s); fun(s,&t); printf("The result is:%ld\n",t); }
P64
时间: 2024-11-14 02:36:26