【说明】
函数int funl (int m,int n)的功能是:计算并返回正整数m和n的最大公约数。
【函数2.1】
int funl (iht m,int n){
while( (1) ) {
if(m>n) m=m-n;
else n=n-m;
}
(2) ;
}
【函数2.2说明】
函数long fun2(char*str)的功能是:自左至右顺序取出非空字符串str中的数字字符形成一个十进制整数(最多8位)。
例如,若字符串str的值为“f3g8d5.ji2e3p12fkp",则函数返回值为3852312。
【函数2.2】
long fun2 (char*str)
int i=0;
long k=0;
char*P=str;
while (*p!=’\0’&& (3) )
if (*p>=’0’&&*p<=’9’)
k= (4) +*p-’0’;
++i;
(5) ;
return k;