下载此文档

实验报告 第四次作业.docx


文档分类:高等教育 | 页数:约8页 举报非法文档有奖
1/8
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/8 下载此文档
文档列表 文档介绍
实验报告 第四次作业.docx学生实验报告
学生姓名
学号
同组人
实验项目
口必修 □选修 口演示性实验□验证性实验 □操作性实验 □综合性实验
实验地点
学校机房
实验仪器台号
52
指导教师
实验日期及节次
2011. 9. 29. 34 节
一、实验综述
1、实验目的及要求
Before you enter the following program in the computer, please point out the errors of it, then analyze and correct the errors.
ttinclude <iostream. h>
int n;
void main ()
(
double m=3. 8;
cout〈<〃n=〃<〈n〈〈endl;
fn();
}
void fn()
(
cout<<zzm=,/<<m<<endl;
cout〈<〃n=〃<〈n〈〈endl;
}
Before you enter the following program in the computer, please read it and write down the output results of the program. Then, you can test the results in the computer by compiling and running it in VC++.
ttinclude <iostream. h> void func ();
int n=l;
int main()
{
static int x=5;
int y;
y=n;
cout<〈〃x二〃<<x++〈<〃,y=/,«++y«/,, n=,,«n«endl;
func ();
cout<〈〃x二〃<<x++〈<〃,y=/,«++y«/,, n=,,«n«endl;
func ();
}
void func ()
(
static int x=4;
int y=10;
x+二 3;
n+二10;
y+=n;
cout<<〃x二〃y=〃n=,/<<n<<endl;
}
Before you enter the following program in the computer, please give the results of the following program of Macros. Then, you can test the results in the computer by compiling and running it in VC++.
ttinclude <iostream. h>
ttdefine f(x) x*x
void main ()
(
cout<<f(4+4)<<endl;
cout<<f(2+2)<<endl;
cout<<f (4+4)/f(2+2)<<endl;
}
Based on the following namespace and what we have learned about namespace, please use two or three dif

实验报告 第四次作业 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数8
  • 收藏数0 收藏
  • 顶次数0
  • 上传人小雄
  • 文件大小149 KB
  • 时间2021-10-28