/*
*copyright(c) 2014,烟台大学计算机学院
*All rights reserved。
*文件名称:静态常量测试
*作者:王忠
*完成日期:2014.11.13
*版本号:v1.0
*
*问题描述:测试静态常量的用法
*输入描述:
*程序输出:
#include <iostream>
using namespace std;
int f(int n);
int main()
{
cout<<f(5)<<" ";
cout<<f(8)<<endl;
return 0;
}
int f(int n)
{
static int a=2;
int b=0;
a+=n;
b+=a;
return b;
}