C语言_第1次实验_C语言开发环境与输入输出
实 验 报 告
(计算机类)
课程名称:C语言程序设计实验项目:C语言开发环境与输入输出计算机号:院系专业:班级学号:学生姓名:实验日期:
信息管理学院
实践教学中心
实验目的:
1. 掌握C语言的语法
2. 熟悉C语言开发环境
3. 掌握C语言的输入与输出实验内容:
1.设计一个C语言程序,输出以下信息:
***************
Hello!
***************
2.设计一个程序,从键盘输入一个圆的半径,求其周长和面积。实验环境(使用硬件、软件等):
1.硬件要求:计算机(CPU: Pentium III 600MHz以上;RAM:256M以上;硬盘空间:4G以上)
2.操作系统: WindowsXP
3.软件要求:Turbo C2.0备注:序号(一)、(二)、(三)为实验预习填写项
实验步骤及程序编辑:
1打开Turbo C2.0
2 新建C程序文件
3 编写代码:
1 main()
{
printf("***************\n");
printf(" Hello! \n");
printf("***************\n");
}
2#include
#define PI 3.1415926
main()
{
float perimeter,area,radius;
printf("Input radius:");
scanf("%f",&radius);
perimeter=2.0*PI*radius;
area=PI*radius*radius;
printf("perimeter=%10.4f\narea=%10.4\n",perimeter,area);
}
程序调试及实验总结:
学习了C语言的基本内容,还有一系列的规定和语法法则,各种数据类型,学会了C语言的简单编辑和程序懂得了换算和各种运算符与表达式,以后要更认真的学习C语言。自我评语:
认真完成实验老师布置的任务,较准确的完成实验内容。成 绩主讲教师: 年 月 日
of the enemy's attack. Troops, and troops were scattered, Qian Kangmin, Commander, Deputy Commander Ding Bingcheng and others heroic martyrdom. Turk foreign "resistance" members for the evacuation. Since then, Wujiang County Government District long Zhang Pinquan was killed by the Japanese. CPC jindapeng, Xiao Xin was trying to recommend thinking
of the enemy's attack. Troops, and troops were scattered, Qian Kangmin, Commander, Deputy Commander Ding Bingcheng and others heroic martyrdom. Turk foreign "resistance" members for the evacuation. Since then, Wujiang County Government District long Zhang Pinquan was killed by the Japanese. CPC jindapeng, Xiao Xin was trying to recommend thinking
of the enemy's attack. Troops, and troops were scattered, Qian Kangmin, Commander, Deputy Commander Ding Bingcheng and others heroic martyrdom. Turk foreign "resistance" members for the evacuation. Since then, Wujiang County Government District long Zhang Pinquan was killed by the Japanese. CPC jindapeng, Xiao Xin wa