【www.scfx8.com--述职述廉报告】

C# 基础编程 设计实验报告

一、实验目的

1、熟悉 Visual Studio .NET 开发环境。

2、掌握 C#应用程序的基本操作过程。

3、掌握 C#的数据类型,运算符以及表达式的使用。

4、掌握分支和循环语句的使用方法。

5、掌握一维数组,二维数组及数组型数组的使用。

二、实验要求

(1)编写程序要规范、正确,上机调试过程和结果要有记录 (2)做完实验后给出本实验的实验报告。

实验设备、环境

安装有 Visual Studio .NET 软件。

四、实验步骤

1、分析题意。

2、根据题目要求,新建项目。

3、编写并输入相关的程序代码。

5、运行与调试项目。

6、保存项目。

五、实验内容

1、编写一个简单的控制台应用程序,打印一行文字(如你的姓名)。

using System; using System.Collections.Generic;

using System.Linq; using System.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;

using 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 = "王蕾!";

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= 0 && m > a[j])//判断 i 下标的数是否大于 j 下标的数

{

a[j + 1] = a[j];//如果 i 下标大于j 把 j 往后移一个位

j--;

}

a[j+1] = m; //当不大于 j 的时候就把 M的值放到 i 下标下面 j+1 是为了下标减到最前时考虑 -1 + 1 还是下标的最前面

}

Console.WriteLine("排序后,数组顺序为:");

show(a);

}

void show(int[] a)

{

int i;

for (i = 0; i stu[k].sumScore) k = j;

if (k != i)

{

Student temp;

temp = stu[k];

stu[k] = stu[i];

stu[i] = temp;

}

}

}

//显示单科成绩的最高分

public int HighScore(int k)

{

int p = 0;

if (k == 0)

{

for (int i = 1; i stu[p].math) p = i;

}

else if (k == 1)

{

for (int i = 1; i stu[p].chinese) p = i;

}

else

{

for (int i = 1; i stu[p].chinese) p = i;

}

return p;

}

//显示不及格名单

public string

BuhgName(int k)

{

string name=" ";

if (k == 0)

{

for (int i = 0; i 90) && (stu[i].chinese 90) &&(stu[i].math 90) && (stu[i].english 下载C#基础编程设计实验报告word格式文档 下载C#基础编程设计实验报告.doc 将本文档下载到自己电脑,方便修改和收藏,请勿使用迅雷等下载。 点此处下载文档

文档为doc格式

本文来源:http://www.scfx8.com/shuzhibaogao/73777.html