/*
* Copyright (c)2013, 烟台大学计算机学院学生
* All rightsreserved.
* 文件名称: array.cpp
* 作 者: 李中意
* 完成日期:2014 年 1 月 27 日
* 版本号: v1.0
* 输入描述:无
*/
#include <iostream>
using namespace std;
int f(int a)
{
int b=0;
int c=3;
b=b+1;
c=c+1;
return a+b+c;
}
int main()
{
int a=2,i;
for(i=0;i<3;i++)
cout<<f(a)<<" ";
cout <<endl;
system("pause");
return 0;
}
/*
* Copyright (c)2013, 烟台大学计算机学院学生
* All rightsreserved.
* 文件名称: array.cpp
* 作 者: 李中意
* 完成日期:2014 年 1 月 27 日
* 版本号: v1.0
* 输入描述:无
*/
#include <iostream>
using namespace std;
int f(int a)
{
auto int b=0;
static int c=3;
b=b+1;
c=c+1;
return a+b+c;
}
int main()
{
int a=2,i;
for(i=0;i<3;i++)
cout<<f(a)<<" ";
cout <<endl;
system("pause");
return 0;
}