继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

c#类

bobbi黑色非凡
关注TA
已关注
手记 4
粉丝 0
获赞 0

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;


namespace ConsoleApplication1

{

    public class student

    {

        public string xh;

        public string xm;

        public string xb;


        public double yw;

        public double sx;

        public double yy;


        public student()

        {


        }

    }

    class Program

    {

        static void Main(string[] args)

        {

            Console.WriteLine("请输入第一位学生信息:");

            student st1=new student();

            Console.Write("学号");

            st1.xh=Console.ReadLine();

            Console.Write("姓名");

            st1.xm=Console.ReadLine();

            Console.Write("性别");

            st1.xb = Console.ReadLine();

            Console.Write("语文成绩");

            st1.yw = Convert.ToDouble(Console.ReadLine());

            Console.Write("数学成绩");

            st1.sx = Convert.ToDouble(Console.ReadLine());

            Console.Write("英语成绩");

            st1.yy = Convert.ToDouble(Console.ReadLine());


            ////////////////////////////////////////////////////////


            Console.WriteLine("请输入第一位学生信息:");

            student st2 = new student();

            Console.Write("学号");

            st2.xh = Console.ReadLine();

            Console.Write("姓名");

            st2.xm = Console.ReadLine();

            Console.Write("性别");

            st2.xb = Console.ReadLine();

            Console.Write("语文成绩");

            st2.yw = Convert.ToDouble(Console.ReadLine());

            Console.Write("数学成绩");

            st2.sx = Convert.ToDouble(Console.ReadLine());

            Console.Write("英语成绩");

            st2.yy = Convert.ToDouble(Console.ReadLine());


            ////////////////////////////////////////////////////////


            Console.WriteLine("请输入第一位学生信息:");

            student st3 = new student();

            Console.Write("学号");

            st3.xh = Console.ReadLine();

            Console.Write("姓名");

            st3.xm = Console.ReadLine();

            Console.Write("性别");

            st3.xb = Console.ReadLine();

            Console.Write("语文成绩");

            st3.yw = Convert.ToDouble(Console.ReadLine());

            Console.Write("数学成绩");

            st3.sx = Convert.ToDouble(Console.ReadLine());

            Console.Write("英语成绩");

            st3.yy = Convert.ToDouble(Console.ReadLine());


            ///////////////////////////////////////////////////////


            Console.WriteLine("学号\t姓名\t性别\t语文\t数学\t英语\t总分\t平均分");

            Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", st1.xh, st1.xm, st1.xb, st1.yw, st1.sx, st1.yy, (st1.yw + st1.sx + st1.yy).ToString("0.00"),((st1.yw + st1.sx + st1.yy)/3).ToString("0.00"));

            Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", st2.xh, st2.xm, st2.xb, st2.yw, st2.sx, st2.yy, (st2.yw + st2.sx + st2.yy).ToString("0.00"), ((st2.yw + st2.sx + st2.yy) / 3).ToString("0.00"));

            Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}", st3.xh, st3.xm, st3.xb, st3.yw, st3.sx, st3.yy, (st3.yw + st3.sx + st3.yy).ToString("0.00"), ((st3.yw + st3.sx + st3.yy) / 3).ToString("0.00"));

            Console.ReadKey();

        }

    }

}

cd Desktop

dir

copy /b xx.jpg+xx.rar xx.jpg

https://img.mukewang.com/5caea17a000106a301400140.jpg


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP