public static double SuccessRate(int speed)
{
double rate = Math.Round(0.0);
if (speed >=1 || speed <= 4)
{
rate = Math.Round(1.0, 0);
}
if (speed >=5 || speed <=8)
{
rate = Math.Round(0.9, 1);
}
if (speed == 9)
{
rate = Math.Round(0.8, 1);
}
if (speed == 10)
{
rate = Math.Round(0.77, 2);
}
return rate;
}
public static double SuccessRate(int speed)
{
double rate = Math.Round(0.0);
if (speed >=1 || speed <= 4)
{
rate = Math.Round(1.0, 0);
}
if (speed >=5 || speed <=8)
{
rate = Math.Round(0.9, 1);
}
if (speed == 9)
{
rate = Math.Round(0.8, 1);
}
if (speed == 10)
{
rate = Math.Round(0.77, 2);
}
return rate;
}