C语言 简单题目

#include "stdafx.h"
#include <stdio.h>
#include <math.h>
#include "string.h"
void header();
void square(int mumber);
void ending();
int sum;
void main()
{
int index;

header();
for( index = 1; index < 7; index++)
square(index);

ending();
}
void beader()
{
sum=0;
printf("this is the hearder for the square progran\n\n");
}
void squre(int number)
{
int numsq;
numsq = number * number;
sum = sum+numsq;
printf("the square of %d is %d \n",number,numsq);
}
void ending()
{
printf("\nThe sum of the squares is %d\n",sum);
这个程序有两个错误 说是
1>lz148.obj : error LNK2019: 无法解析的外部符号 "void __cdecl square(int)" (?square@@YAXH@Z),该符号在函数 _main 中被引用
1>lz148.obj : error LNK2019: 无法解析的外部符号 "void __cdecl header(void)" (?header@@YAXXZ),该符号在函数 _main 中被引用
1>D:\My Documents\Visual Studio 2008\Projects\lz148\Debug\lz148.exe : fatal error LNK1120: 2 个无法解析的外部命令
2个错误什么意思
如何修改。

这是输出:
this is the hearder for the square progran

the square of 1 is 1
the square of 2 is 4
the square of 3 is 9
the square of 4 is 16
the square of 5 is 25
the square of 6 is 36

The sum of the squares is 91
Press any key to continue

\*下面给你改过后的内容。*\

#include <stdio.h>
#include <math.h>
#include "string.h"
void header();
void square(int mumber);
void ending();
int sum;
void main()
{
int index;

header();
for( index = 1; index < 7; index++)
square(index);

ending();
}
void header()
{
sum=0;
printf("this is the hearder for the square progran\n\n");
}
void square(int number)
{
int numsq;
numsq = number * number;
sum = sum+numsq;
printf("the square of %d is %d \n",number,numsq);
}
void ending()
{
printf("\nThe sum of the squares is %d\n",sum);
}
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-08-17
void beader()
void squre(int number)
这两个函数名错了,改过来就ok了
第2个回答  2010-08-17
header
square

这两个单词写错了,前后不对应。
第3个回答  2010-08-30
大哥,函数名都错了,当然调用不了了,肯定会无法解析的外部符号