求助 少参数是什么意思????
#include <stdio.h>int max_commom_divisor(int m,int n,int c)
{
int l;
l=m*n/c;
return l;
}
int min_common_multiple(int m,int n,int k)
{
for(k=n;;k++)
{
if(k%m==0&&k%n==0)
break;
}
return k;
}
int main(int argc, char *argv[])
{
int m,n,k,a,b,c,d;
printf("请输入两个数m,n:\n");
scanf("%d%d",&m,&n);
while(m<=0||n<=0||m<=n)
{
printf("请输入两个数m,n:\n");
scanf("%d%d",&m,&n);
}
b=min_common_multiple(m,n,k);
c=min_common_multiple();
a=max_commom_divisor(m,n,c);
d=max_commom_divisor();
printf("最小公倍数为:%d",c);
printf("最大公约数为:%d",d);
return 0;
}
--------------------配置: mingw5 - CUI Release, 编译器类型: MinGW--------------------
检查文件依赖性...
正在编译 C:\Users\98117\Documents\C-Free\Temp\未命名1.cpp...
[Error] C:\Users\98117\Documents\C-Free\Temp\未命名1.cpp:9: error: too few arguments to function `int min_common_multiple(int, int, int)'
[Error] C:\Users\98117\Documents\C-Free\Temp\未命名1.cpp:29: error: at this point in file
[Error] C:\Users\98117\Documents\C-Free\Temp\未命名1.cpp:3: error: too few arguments to function `int max_commom_divisor(int, int, int)'
[Error] C:\Users\98117\Documents\C-Free\Temp\未命名1.cpp:31: error: at this point in file
构建中止 未命名1: 4 个错误, 0 个警告