") == -1) { html = " " + html; } html = html.replace("",""); html = html.replace("",""); html = html.replace("",""); html = html.trim(); doc.innerHTML = html; return ( doc.innerHTML.toLowerCase() === html.toLowerCase() ); } function codeCheckWarningClose() { document.getElementById("codeCheckWarning").style.display = "none"; } function codeCheckCorrectClose() { document.getElementById("codeCheckCorrect").style.display = "none"; }
菜单
×
×
正确!

练习

如果x等于y,则打印“1”;如果x大于y,则打印“2”;否则打印“3”。

int x = 50; int y = 50; if (x == y) { Console.WriteLine("1"); } else if (x > y) { Console.WriteLine("2"); } else { Console.WriteLine("3"); }

不正确

点击此处重新尝试。

正确!

下一题 ❯
int x = 50; int y = 50;  (x  y) { Console.WriteLine("1"); }  (x  y) { Console.WriteLine("2"); }  { Console.WriteLine("3"); }

    
  




 

C# 语法
C# 注释
C# 变量
C# 数据类型
C# 用户输入
C# 运算符
C# 数学
C# 字符串
C# 布尔值
C# If...Else
C# Switch
C# 循环
C# 数组
C# 方法
C# 类/对象
C# 异常

×

重置分数?

这将重置所有 58 道练习的分数。

您确定要继续吗?



×

恭喜!

您已完成所有 58 道 C# 练习。

分享您的分数