【u盘小偷源码】【jsp网站免费源码】【尾数夺宝源码下载】readline的源码_readline/readline.h

2025-02-05 16:13:01 来源:声音剪辑+源码 分类:综合

1.C#操作TXT文本的源代码!
2.编一个程序,首先输入一个成绩(0-100),然后用if else语句判断该成绩是u盘小偷源码优、良、中、jsp网站免费源码及格还是不及格。

readline的源码_readline/readline.h

C#操作TXT文本的源代码!

       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;

       using System.IO;

       namespace OutputText

       {

        public partial class Form1 : Form

        {

        public Form1()

        {

        InitializeComponent();

        this.Load += new EventHandler(Form1_Load);

        }

        void Form1_Load(object sender, EventArgs e)

        {

        this.btnShow.Click += new EventHandler(btnShow_Click);

        }

        void btnShow_Click(object sender, EventArgs e)

        {

        // 判断输入的行数

        string input = this.txtInput.Text.Trim();

        //用于读文本的时候记数

        int numOfTextFile;

        // int.TryParse验证输入的是不是行数

        if (int.TryParse(input, out numOfTextFile))

        {

        //StreamReader 打开文件

        using(StreamReader sr = new StreamReader(@"D:\text.txt"))

        {

        int count=0;

        // ReadLine 读一行

        string txtContent = sr.ReadLine();

        while (txtContent != null)

        {

        //读一行记一下数

        count++;

        //如果和你要求的输入行数匹配,显示文本,中断循环

        if (count == numOfTextFile)

        {

        this.textBox1.Text = txtContent;

        this.textBox2.Text = txtContent;

        this.textBox3.Text = sr.ReadLine();

        break;

        }

        else

        {

        txtContent = sr.ReadLine();

        }

        }

        }

        }

        }

        }

       }

编一个程序,首先输入一个成绩(0-),然后用if else语句判断该成绩是尾数夺宝源码下载优、良、中、及格还是eclipse挂载源码调试不及格。

       using System;

       using System.Collections.Generic;

       using System.Linq;

       using System.Text;

       namespace ScoreGrade

       {

        class Program

        {

        static void Main(string[] args)

        {

        double a;

        Console.WriteLine("请输入成绩:");

        a = Convert.ToDouble(Console.ReadLine());

        if (a >= && a <= )

        {

        Console.WriteLine("该成绩优秀!");

        Console.ReadLine();

        }

        else if (a >= && a <= )

        {

        Console.WriteLine("该成绩良好!");

        Console.ReadLine();

        }

        else if (a >= && a <= )

        {

        Console.WriteLine("该成绩为中!spring框架源码包");

        Console.ReadLine();

        }

        else if (a >= && a <= )

        {

        Console.WriteLine("该成绩及格!");

        Console.ReadLine();

        }

        else

        {

        Console.WriteLine("该成绩不及格!");

        Console.ReadLine();

        }

        }

        }

       }

更多资讯请点击:综合

推荐资讯

女子醉驾被抓 坐副驾的他竟然成共犯 到底为什么?

海峡网4月11日讯 泉州网记者 林志安 通讯员张驰 蔡一真 文/图)喝了酒后没有开车,而是坐在副驾驶位,蔡某却因涉嫌危险驾驶罪要被判刑,为什么呢?近日,惠安交警大队受理了一起因醉驾而引发的交通事故案件

市场监管行风建设在行动

中国消费者报北京讯记者孙蔚)“真没想到变更企业名称、股东等一系列事项,能得到北京市海淀区市场监管局一对一的指导和服务,办事效率太高了!”近日,58同城公共事务部负责人对《中国消费者报》记者感慨道。据记