熟悉C语言程序的运行环境实验报告,c语言实验报告1 了解C程序的运行环境和运行一个C程序的方法.doc...

c语言实验报告1 了解C程序的运行环境和运行一个C程序的方法

《C程序设计》课程实验报告

学院: 班级: 姓名: 学号:

实验设备:计算机1台2011年 3 月 1日

实验项目名称了解C程序的运行环境和运行一个C程序的方法

1)熟悉所用的Visual C++6.0编程环境的基础操作方法。(2)学习在C集成环境下一个完整的C程序开发过程(编辑、编译、连接、调试和运行一个C程序)。(3)理解简单的C程序结构。

实验要求:

能够熟悉C的集成环境,掌握基础操作方法。

实验内容(包括步骤):

实验步骤:

1.启动C语言编译系统。

2. 编辑修改源程序。

3.编译连接程序。

4.运行程序

5.显示运行结果。

实验内容:

1、上机运行本章的例1.1, 1.2和1.3,熟悉所用系统的上机方法和步骤。

2、 模仿例1.1编写一个C程序,输出以下信息:

*****************************

Very good!

*****************************

3、 模仿例1.3编写一个C程序,输入a、b、c3个值,输出其中最大者。

调试与结果测试:

调试结果都正常。

代码注释: 1-1.1

#include

int main()

{

printf("This is a C program.\n");

return 0;

}

1-1.2

#include

int main()

{

int a,b,sum;

a=123;

b=456;

sum=a+b;

printf("sum is %d\n",sum);

return 0;

}

1-1.3

#include

int main()

{

int max(int x,int y);

int a,b,c;

scanf("%d,%d",&a,&b);

c=max(a,b);

printf("max=%d\n",c);

return 0;

}

int max(int x,int y)

{

int z;

if(x>y)z=x;

else z=y;

return(z);

}

1-2

#include

int main()

{

printf("********************\n\n");

printf(" Very good! \n\n");

printf("********************\n");

return 0;

}

1-3

#include

int main()

{

int a,b,c,max;

printf("please input a,b,c:\n");

scanf("%d,%d,%d",&a,&b,&c);

max=a;

if(max

if(max

printf("The largest number is %d\n",max);

return 0;

}

――――――――――――以下内容为教师填写―――――――――――――――

教师评阅:?

?

成绩:

2011年月日

物光学院计算机类实验报告

to prevent the accumulation of air, both ends of the tube are required the Center to bake. 6.2.5 sets should be at the bottom 200mm lashing cable head is fixed rung, with a similar cable color of plastic lashings. Cable head using "equal-width stacked" layout, or according to the size and space within the enclosure cable volume adjust, but you must ensure uniform, neat and elegant. 6.2.6 disc cabinet within cable shield layer requirements

to prevent the accumulation of air, both ends of the tube are required the Center to

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值