日期:2014-05-18 浏览次数:20596 次
var result = ((float) a/ (float) b);
string str;
if (result > 0.9)
str = "High";
else if (result > 0.5)
str = "Medium";
else
str = "Low";
------解决方案--------------------
int a=3;
int b=2;
if((Double.Parse(a)/Double.Parse(b)):<0.5)
{
//低
}
else if(((Double.Parse(a)/Double.Parse(b)):>0.5&&((Double.Parse(a)/Double.Parse(b)):<0.9)
{
//中
}
------解决方案--------------------