谁能帮我看看我的代码怎么错误的,谢谢了
#include<stdio.h>int maxi(m,n)
int m,n;
{
int i=1,t;
for(;i<=m&&i<=n;i++)
{
if(m%i==0&&n%i==0)
t=i;
}
return(t);
}
int mini(m,n)
int m,n;
{
int j;
if(m>=n)
j=m;
else
j=n;
for(;!(j%m==0&&j%n==0);j++);
return j;
}
int main()
{
int a,b,max,min;
printf("enter two number is: ");
scanf("%d,%d",&a,&b);
max=maxi(a,b);
min=mini(a,b);
printf("max=%d,min=%d\n",max,min);
}
为什么用vc运行之后会出现
E:\Microsoft Visual Studio\MyProjects\8点1\1.cpp(2) : error C2065: 'm' : undeclared identifier
E:\Microsoft Visual Studio\MyProjects\8点1\1.cpp(2) : error C2065: 'n' : undeclared identifier
E:\Microsoft Visual Studio\MyProjects\8点1\1.cpp(3) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
E:\Microsoft Visual Studio\MyProjects\8点1\1.cpp(3) : fatal error C1004: unexpected end of file found