函数fun的功能是:将形参n所指变量中,各位上为偶数的数去除,并按原来从高位到低位的顺序组成一个数.#include "stdio.h"unsigned long fun(unsigned long n){\x05unsigned long x=10;\x05while(n)\x05{\x05\x05int t;\x05\x0
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/20 07:12:00
![函数fun的功能是:将形参n所指变量中,各位上为偶数的数去除,并按原来从高位到低位的顺序组成一个数.#include](/uploads/image/z/7840379-11-9.jpg?t=%E5%87%BD%E6%95%B0fun%E7%9A%84%E5%8A%9F%E8%83%BD%E6%98%AF%EF%BC%9A%E5%B0%86%E5%BD%A2%E5%8F%82n%E6%89%80%E6%8C%87%E5%8F%98%E9%87%8F%E4%B8%AD%2C%E5%90%84%E4%BD%8D%E4%B8%8A%E4%B8%BA%E5%81%B6%E6%95%B0%E7%9A%84%E6%95%B0%E5%8E%BB%E9%99%A4%2C%E5%B9%B6%E6%8C%89%E5%8E%9F%E6%9D%A5%E4%BB%8E%E9%AB%98%E4%BD%8D%E5%88%B0%E4%BD%8E%E4%BD%8D%E7%9A%84%E9%A1%BA%E5%BA%8F%E7%BB%84%E6%88%90%E4%B8%80%E4%B8%AA%E6%95%B0.%23include+%22stdio.h%22unsigned+long+fun%28unsigned+long+n%29%7B%5Cx05unsigned+long+x%3D10%3B%5Cx05while%28n%29%5Cx05%7B%5Cx05%5Cx05int+t%3B%5Cx05%5Cx0)
函数fun的功能是:将形参n所指变量中,各位上为偶数的数去除,并按原来从高位到低位的顺序组成一个数.#include "stdio.h"unsigned long fun(unsigned long n){\x05unsigned long x=10;\x05while(n)\x05{\x05\x05int t;\x05\x0
函数fun的功能是:将形参n所指变量中,各位上为偶数的数去除,并按原来从高位到低位的顺序组成一个数.
#include "stdio.h"
unsigned long fun(unsigned long n)
{
\x05unsigned long x=10;
\x05while(n)
\x05{
\x05\x05int t;
\x05\x05//
\x05\x05n=[3];
\x05}
\x05return x;
}
void main()
{
unsigned long n=-1;
while(n>99999999||n
函数fun的功能是:将形参n所指变量中,各位上为偶数的数去除,并按原来从高位到低位的顺序组成一个数.#include "stdio.h"unsigned long fun(unsigned long n){\x05unsigned long x=10;\x05while(n)\x05{\x05\x05int t;\x05\x0
int fun(int n){
\x09int d,e=1,m=0;
\x09while(n!=0){
\x09\x09d=n%10;
\x09\x09if(d%2==1){
\x09\x09\x09m=d*e+m;
\x09\x09\x09e=e*10;
\x09\x09}
\x09\x09n=n/10;
\x09}
\x09return m;
}