小编Kyl*_*e W的帖子

If ... Else语句C#中的表达式语句无效

在尝试根据用户输入的温度输出console应用程序的VSL studio 2012输出建议时,我遇到了错误

"无效的表达术语"

我在此代码中的所有其他if语句.我不知道我在这里做错了什么.

如果有人能指出我正在解决这个问题的方向,那将是惊人的!谢谢

if (temp <= 40)
{
    Console.WriteLine(" It is very cold. Put on a heavy coat.");
}
else if (temp > 40 && <= 60)
{
    Console.WriteLine("It is cold. Put on a coat.");
}
else if (temp > 60 && <= 70)
{
    Console.WriteLine("The temperature is cool. Put on a light jacket.");
}
else if (temp > 70 && <= 80)
{
    Console.WriteLine("The temperature is pleasent. You can wear anything you …
Run Code Online (Sandbox Code Playgroud)

c# if-statement visual-studio-2012

-2
推荐指数
1
解决办法
541
查看次数

标签 统计

c# ×1

if-statement ×1

visual-studio-2012 ×1