当我尝试求解简单方程时遇到问题。我的方程式是找到学生分数的百分比。这是我的代码:
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 thered_Try
{
public partial class Form1 : Form
{
decimal res;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int oneee = 300;
int two = 1000;
int thee = 10;
res = (oneee / two) * 10;
label1.Text = res.ToString();
}
private void button2_Click(object sender, EventArgs e)
{
Form2 form = new Form2();
form.ShowDialog();
}
}
}
结果为0。我的错误在哪里?