函数fun的功能是:将形参n所指变量中,各位上为偶数的数去除,并按原来从高位到低位的顺序组成一个数.
#include"stdio.h"unsignedlongfun(unsignedlongn){unsignedlongx=10;while(n){intt;/*****...
#include "stdio.h"
unsigned long fun(unsigned long n)
{
unsigned long x=10;
while(n)
{
int t;
/*****found*****/
if(t%2==[1])
/*****found*****/
x=[2]+t;
/*****found*****/
n=[3];
}
return x;
}
void main()
{
unsigned long n=-1;
while(n>99999999||n<0)
{
printf("输入值\n");
scanf("%ld",&n);
}
printf("\nthe resulf is:%ld\n",fun(n));
} 展开
unsigned long fun(unsigned long n)
{
unsigned long x=10;
while(n)
{
int t;
/*****found*****/
if(t%2==[1])
/*****found*****/
x=[2]+t;
/*****found*****/
n=[3];
}
return x;
}
void main()
{
unsigned long n=-1;
while(n>99999999||n<0)
{
printf("输入值\n");
scanf("%ld",&n);
}
printf("\nthe resulf is:%ld\n",fun(n));
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询