|

楼主 |
发表于 2023-5-7 13:08:33
|
显示全部楼层
- #include<stdio.h>
- int ffmax(int x,int y,int z)
- {
- int max=0;
- if(x>y&&x>z)
- {
- max=x;
- }
- if(y>x&&y>z)
- {
- max=y;
- }
- if(z>y&&z>x)
- {
- max=z;
- }
- return max;
- }
- int fmaxfactor(int m,int n)
- {
- while(m!=n)
- {
- if(m>n)
- {
- m=m-n;
- }
- else
- {
- n=n-m;
- }
- }
- return m;
- }
- void fstar(int m)
- {
- }
- int fgeneral(int m,int a)
- {
- int sum=0,t,i;
- t=a;
- for(i=0;i<m;i++)
- {
- sum+=t;
- t=t*10;
- }
- return sum;
- }
- int main()
- {
- int a,b,c,max,f;
- int factor,multiple;
- int k,m,sum,i,date=0;
- scanf("%d %d %d",&a,&b,&c);
- max=ffmax(a,b,c);
- printf("fmax is %d\n",max);
- factor=fmaxfactor(a+b,b+c);
- multiple=(a+b)*(b+c)/factor;
- printf("factor is %d\nthe multiple is %d\n",factor,multiple);
- k=(a+b)%10;
- m=(b+c)%10;
- sum=fgeneral(m,k);
- for(i=0;i<m;i++)
- {
- date+=sum;
- sum=sum/10;
- }
- printf("fgeneral data is %d\n",date);
-
-
- return 0;
- }
复制代码
这是除了函数三其他的代码,我看不太懂你写的那个,好像不太一样
|
|