Files
Csharp/C#入门/Lesson12_条件运算符练习/Program.cs
T
2025-09-30 16:49:43 +08:00

35 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
namespace Lesson12_练习题
{
class Program
{
static void Main(string[] args)
{
#region 口算
//请回答一下问题:
//我的年龄(18>你们的年龄(22)false
//兔子的速度(3m/s<乌龟的速度(1m/sfalse
//狗的重量(50kg<兔子的重量(2kgfalse
//我有钱(10元)==你有钱(10元)true
#endregion
#region 求打印结果
//bool b = true;
//console.WriteLine(b != true); false
//console.WriteLine(10==10); ture
//console.WriteLine(10 > 20); false
//console.WriteLine(10 <= 20); true
//console.WriteLine(10 <= 10); true
#endregion
#region 综合练习
//bool gameOver,startGame;
//int a = 10,b = 15;
//gameOver = a > (b - 5);
//startGame = gameOver == (b > (a + 5));
//console.WriteLine("stratGame = " + startGame);
//true
#endregion
}
}
}