c程序设计实验报告资料

上传人:E**** 文档编号:102048249 上传时间:2019-10-01 格式:DOC 页数:52 大小:191KB
返回 下载 相关 举报
c程序设计实验报告资料_第1页
第1页 / 共52页
c程序设计实验报告资料_第2页
第2页 / 共52页
c程序设计实验报告资料_第3页
第3页 / 共52页
c程序设计实验报告资料_第4页
第4页 / 共52页
c程序设计实验报告资料_第5页
第5页 / 共52页
点击查看更多>>
资源描述

《c程序设计实验报告资料》由会员分享,可在线阅读,更多相关《c程序设计实验报告资料(52页珍藏版)》请在金锄头文库上搜索。

1、实验报告书写要求实验报告原则上要求学生手写,要求书写工整。若因课程特点需打印的,标题采用四号黑体,正文采用小四号宋体,单倍行距。纸张一律采用A4的纸张。实验报告书写说明实验报告中实验目的和要求、实验仪器和设备、实验内容与过程、实验结果与分析这四项内容为必需项。教师可根据学科特点和实验具体要求增加项目。填写注意事项(1)细致观察,及时、准确、如实记录。(2)准确说明,层次清晰。(3)尽量采用专用术语来说明事物。(4)外文、符号、公式要准确,应使用统一规定的名词和符号。(5)应独立完成实验报告的书写,严禁抄袭、复印,一经发现,以零分论处。实验报告批改说明实验报告的批改要及时、认真、仔细,一律用红色

2、笔批改。实验报告的批改成绩采用五级记分制或百分制,按金陵科技学院课堂教学实施细则中作业批阅成绩评定要求执行。实验报告装订要求实验批改完毕后,任课老师将每门课程的每个实验项目的实验报告以自然班为单位、按学号升序排列,装订成册,并附上一份该门课程的实验大纲。金陵科技学院实验报告实验项目名称: C#基础编程 实验学时: 6 同组学生姓名: 实验地点: 1318 实验日期: 10月5日-10月19日 实验成绩: 批改教师: 批改时间: 实验1 C#基础编程一、实验目的1、熟悉Visual Studio .NET开发环境。2、掌握C#应用程序的基本操作过程。3、掌握C#的数据类型,运算符以及表达式的使用

3、。4、掌握分支和循环语句的使用方法。5、掌握一维数组,二维数组及数组型数组的使用。二、实验要求(1)编写程序要规范、正确,上机调试过程和结果要有记录(2)做完实验后给出本实验的实验报告。三、实验设备、环境 安装有Visual Studio .NET软件。四、实验步骤1、分析题意。2、根据题目要求,新建项目。3、编写并输入相关的程序代码。5、运行与调试项目。6、保存项目。五、实验内容1、编写一个简单的控制台应用程序,打印一行文字(如你的姓名)。using System;using System.Collections.Generic;using System.Linq;using System.

4、Text;namespace one.first class Program static void Main(string args) System.Console.WriteLine(我叫王蕾!); 2、编写一个简单的Windows应用程序,在窗体Load事件中书写代码,标签中显示你的姓名。using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;usi

5、ng System.Windows.Forms;namespace one.second public partial class Form1 : Form public Form1() InitializeComponent(); private void Form1_Load(object sender, EventArgs e) this.Text = Windows 程序; Label lblShow = new Label(); lblShow.Location = new Point(20, 30); lblShow.AutoSize = true; lblShow.Text =

6、王蕾!; this.Controls.Add(lblShow); 3、编写一个一个程序,用来判断输入的是大写字母,小写字母,数字还是其他的字符。using System;using System.Collections.Generic;using System.Text;namespace one.third class Program static void Main(string args) Console.WriteLine(请输入一个字符:); char c = Convert.ToChar(Console.ReadLine(); if (c=a&c=A&c=Z) Console.Wr

7、iteLine(这是一个字母); if (char.IsDigit(c) Console .WriteLine(这是一个数字); 4、分别用while,do-while,for循环求1到100的和。using System;using System.Collections.Generic;using System.Text;namespace one.forth.one class Program static void Main(string args) int i = 1, sum = 0; while (i = 100) sum = sum + i; i+; Console.WriteL

8、ine(1到100的自然数之和为: + sum); using System;using System.Collections.Generic;using System.Text;namespace one.forth.two class Program static void Main(string args) int i = 1, sum = 0; do sum = sum + i; i+; while (i = 100); Console .WriteLine(1到100的自然数的和为: + sum ); using System;using System.Collections.Gen

9、eric;using System.Text;namespace one.forth.three class Program static void Main(string args) int i , sum = 0; for (i = 1; i = 100; i+) sum = sum + i; Console.WriteLine(1到100的自然数的和为: + sum); 5、定义一个一维数组,用随机数为此赋值,用foreach循环输出其中的内容。using System;using System.Collections.Generic;using System.Linq;using Sy

10、stem.Text;namespace first.five class Program static void Main(string args) int a = 0,1,2,3,4; foreach (int i in a) Console.WriteLine(ai); 6、实现二维数组的输入和输出。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace first.six class Program static void Main(string args) i

11、nt, a = new int2, 3 1, 2, 3 , 4, 5, 6 ; for (int i = 0; i 2; i+) for (int j = 0; j 3; j+) Console.WriteLine(ai, j); 7、实现数组型数组的输入和输出。using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace first.seven class Program static void Main(string args) int a = new int new int 1, 2, 3 , new int 4

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号