我有这个程序从可能的 200 分中取 3 分,然后应该得到平均值并显示百分比。但是当我输入数字时,我得到 00.0 作为答案。我可能做错了什么?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int Score1;
int Score2;
int Score3;
Console.Write("Enter your score (out of 200 possible) on the first test: ");
Score1 = int.Parse(Console.ReadLine());
Console.Write("Enter your score (out of 200 possible) on the second test: ");
Score2 = int.Parse(Console.ReadLine());
Console.Write("Enter your score (out of 200 possible on the third test: ");
Score3 = int.Parse(Console.ReadLine());
Console.WriteLine("\n");
float percent = (( Score1+ Score2+ Score3) / 600);
Console.WriteLine("Your percentage to date is: {0:00.0}", percent);
Console.ReadLine();
}
}
}