C#编程 输出 1+2+3+4+5+6+7+n

来源:百度知道 编辑:UC知道 时间:2024/05/27 11:53:32
N是几就加到几

程序部分

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace WindowsApplication1

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        private void button1_Click(object sender, EventArgs e)

        {

            int end =&nb