int count = 0;
for (int i = 1; i < 6; i++)
{
Console.WriteLine("请输入{0}场的游戏点击率", i);
int a = Convert.ToInt32(Console.ReadLine());
if (a > 100)
{
count = count + 1;
}
}
Console.WriteLine("点击率大于100的游戏数是{0}", count);
Single b = 0;
b = count * 100 / 5;
Console.WriteLine("点击率大于100的游戏比率为{0}%", b);
Console.ReadKey();
网友评论