利用c#编写Windows应用程序计算学生成绩:
效果图:
创建Windows窗体 然后在里面拖入Panel控件,然后再拖入7个label控件、6个TextBox控件、三个Button控件。
下面是我写的代码:
有任何不懂得可以评论留言,我也是才学C#也请多多指教`
`
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 计算学生成绩总分和平均分
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
}
//先创建一个计算总分的方法:
private int Zon(int a, int b, int c, int d)
{
int s