Synchronization of old projects
Part1
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
namespace Lesson12_练习题
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
#region 口算
|
||||
//请回答一下问题:
|
||||
//我的年龄(18)>你们的年龄(22)false
|
||||
//兔子的速度(3m/s)<乌龟的速度(1m/s)false
|
||||
//狗的重量(50kg)<兔子的重量(2kg)false
|
||||
//我有钱(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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user