C#程序错误 CS1022: 应输入类型、命名空间定义或文件尾,请问怎么改
usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Da...
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 水仙花数
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int n,i,j,k;
i=Convert .ToInt32 (textBox1 .Text );
j=Convert .ToInt32 (textBox2 .Text );
k=Convert .ToInt32 (textBox3 .Text );
n=Convert .ToInt32 (textBox4 .Text );
i=n/100;
j=n/10-i*10;
k=n%10;
if (n=i*i*i+j*j*j+k*k*k);
textBox4 .Text =n .ToString ();
}
}
}
} 展开
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace 水仙花数
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int n,i,j,k;
i=Convert .ToInt32 (textBox1 .Text );
j=Convert .ToInt32 (textBox2 .Text );
k=Convert .ToInt32 (textBox3 .Text );
n=Convert .ToInt32 (textBox4 .Text );
i=n/100;
j=n/10-i*10;
k=n%10;
if (n=i*i*i+j*j*j+k*k*k);
textBox4 .Text =n .ToString ();
}
}
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询