- 函数原型描述了函数接口,即函数部分如何与程序的其他部分进行交互(函数调用)
- 函数(出入信息所指定的黑盒子)
- 函数(函数头—作为接口+函数体)
#include<iostream>
using namespace std;
int stonetolb(int);
int main()
{
int stone;
cout<<"enter the weight in stone:";
cin>>stone;
int pounds=stonetolb(stone);
cout<<stone<<"stone=";
cout<<pounds<<"pounds."<<endl;
return 0;
}
int stonetolb(int sts)
{
return 14*sts;
}