怎么解决这个问题啊!小弟新手啊
#include<stdio.h>
#include<math.h>
main()
{
int m;
printf("please input number:\n");
scanf("%d",&m);
sun(m);
printf("m=%d\n",m);
}
int sum(int m)
{
for(i=m-1;i>=1;i--)
m=m+1;
printf("m=%d\n",m);
}
tc\13\13.cpp(8) : error C2065: 'sun' : undeclared identifier
C:\tc\13\13.cpp(10) : warning C4508: 'main' : function should return a value; 'void' return type assumed
C:\tc\13\13.cpp(13) : error C2065: 'i' : undeclared identifier
执行 cl.exe 时出错.
13.exe - 1 error(s), 0 warning(s)
帮忙解释下这个怎么改!小弟是新手 呵呵谢谢了!