求解答,函数问题
#include<stdio.h>void ber(int level);
int num(int i,int j);
int number(int n);
void main()
{
int level;
printf("please intput you need know what's line yanghui number:\n");
scanf("level",&level);
printf("There number is:\n");
ber(level);
}
void ber(int level)
{
int row,col;
for(row=0;row<level;row++)
{
for(col=0;col<=1;col++)
printf("%6d",nu(row,col));
printf("\n");
}
int num(int i,int j)
{
return number(n)/(number(k)*number(n-k));
}
int number(int n)
{
int pro=1,i;
for(i=1;i<=n;i++)
pro*=i;
return(pro);
}
出现了这样的错误
Compiling...
dome.cpp
C:\Documents and Settings\LZDX\桌面\dome.cpp(23) : error C2601: 'num' : local function definitions are illegal
C:\Documents and Settings\LZDX\桌面\dome.cpp(27) : error C2601: 'number' : local function definitions are illegal
C:\Documents and Settings\LZDX\桌面\dome.cpp(33) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
dome.obj - 1 error(s), 0 warning(s)