day1
This commit is contained in:
parent
c327ae81c9
commit
652cfe9d72
25
第一课_你好世界/第一课_你好世界.sln
Normal file
25
第一课_你好世界/第一课_你好世界.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34004.107
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "第一课_你好世界", "第一课_你好世界\第一课_你好世界.csproj", "{0B7E78CF-B740-421B-AE6B-CE95CAAD5576}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0B7E78CF-B740-421B-AE6B-CE95CAAD5576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0B7E78CF-B740-421B-AE6B-CE95CAAD5576}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0B7E78CF-B740-421B-AE6B-CE95CAAD5576}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0B7E78CF-B740-421B-AE6B-CE95CAAD5576}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1749DBB7-9D4B-4479-A144-97F8DB77B19B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
10
第一课_你好世界/第一课_你好世界/Program.cs
Normal file
10
第一课_你好世界/第一课_你好世界/Program.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace 第一课_你好世界
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, World!");
|
||||
}
|
||||
}
|
||||
}
|
10
第一课_你好世界/第一课_你好世界/第一课_你好世界.csproj
Normal file
10
第一课_你好世界/第一课_你好世界/第一课_你好世界.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
31
第三课_输入和输出/第三课_输入和输出.sln
Normal file
31
第三课_输入和输出/第三课_输入和输出.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34004.107
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "第三课_输入和输出", "第三课_输入和输出\第三课_输入和输出.csproj", "{D27EDDBE-7FA5-400D-A504-83D38875A91E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "简单计算", "简单计算\简单计算.csproj", "{1BC77195-2965-4950-8287-8C207033DA77}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D27EDDBE-7FA5-400D-A504-83D38875A91E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D27EDDBE-7FA5-400D-A504-83D38875A91E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D27EDDBE-7FA5-400D-A504-83D38875A91E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D27EDDBE-7FA5-400D-A504-83D38875A91E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1BC77195-2965-4950-8287-8C207033DA77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1BC77195-2965-4950-8287-8C207033DA77}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1BC77195-2965-4950-8287-8C207033DA77}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1BC77195-2965-4950-8287-8C207033DA77}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {660C84A7-A259-447F-8382-8183569822DA}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
12
第三课_输入和输出/第三课_输入和输出/Program.cs
Normal file
12
第三课_输入和输出/第三课_输入和输出/Program.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace 第三课_输入和输出
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.Write("请输入你的姓名:");
|
||||
string 姓名 = Console.ReadLine();
|
||||
Console.WriteLine("你好!" + 姓名 + "欢迎来到C#的世界");
|
||||
}
|
||||
}
|
||||
}
|
10
第三课_输入和输出/第三课_输入和输出/第三课_输入和输出.csproj
Normal file
10
第三课_输入和输出/第三课_输入和输出/第三课_输入和输出.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
23
第三课_输入和输出/简单计算/Program.cs
Normal file
23
第三课_输入和输出/简单计算/Program.cs
Normal file
@ -0,0 +1,23 @@
|
||||
namespace 简单计算
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("欢迎使用加法计算器!");
|
||||
Console.Write("请输入第一个数字:");
|
||||
string 数字输入1 = Console.ReadLine();
|
||||
Console.Write("请输入第二个数字:");
|
||||
string 数字输入2 = Console.ReadLine();
|
||||
|
||||
//int 数字1 = Convert.ToInt32(数字输入1); //思考输入的数据类型,是不是有可能会输入含有小数的内容?
|
||||
//int 数字2 = Convert.ToInt32(数字输入2);
|
||||
|
||||
double 数字1 = Convert.ToDouble(数字输入1);
|
||||
double 数字2 = Convert.ToDouble(数字输入2);
|
||||
double 结果 = 数字1 + 数字2;
|
||||
|
||||
Console.WriteLine("计算结果是结果是" + 结果);
|
||||
}
|
||||
}
|
||||
}
|
10
第三课_输入和输出/简单计算/简单计算.csproj
Normal file
10
第三课_输入和输出/简单计算/简单计算.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
28
第二课_数据类型/数据类型范围/Program.cs
Normal file
28
第二课_数据类型/数据类型范围/Program.cs
Normal file
@ -0,0 +1,28 @@
|
||||
namespace 数据类型范围
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.Write("int数据类型的最大值是:");
|
||||
Console.WriteLine(int.MaxValue);
|
||||
Console.Write("int数据类型的最小值是:");
|
||||
Console.WriteLine(int.MinValue);
|
||||
|
||||
Console.Write("uint数据类型的最大值是:");
|
||||
Console.WriteLine(uint.MaxValue);
|
||||
Console.Write("uint数据类型的最小值是:");
|
||||
Console.WriteLine(uint.MinValue);
|
||||
|
||||
|
||||
Console.Write("double数据类型的最大值是:");
|
||||
Console.WriteLine(double.MaxValue);
|
||||
Console.Write("double数据类型的最小值是:");
|
||||
Console.WriteLine(double.MinValue);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
10
第二课_数据类型/数据类型范围/数据类型范围.csproj
Normal file
10
第二课_数据类型/数据类型范围/数据类型范围.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
31
第二课_数据类型/第二课_数据类型.sln
Normal file
31
第二课_数据类型/第二课_数据类型.sln
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34004.107
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "第二课_数据类型", "第二课_数据类型\第二课_数据类型.csproj", "{98DFD84B-2E81-426F-A5EC-8435B355F880}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "数据类型范围", "数据类型范围\数据类型范围.csproj", "{6539CF5A-A76C-4953-A51A-BAB67067237B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{98DFD84B-2E81-426F-A5EC-8435B355F880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{98DFD84B-2E81-426F-A5EC-8435B355F880}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{98DFD84B-2E81-426F-A5EC-8435B355F880}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{98DFD84B-2E81-426F-A5EC-8435B355F880}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6539CF5A-A76C-4953-A51A-BAB67067237B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6539CF5A-A76C-4953-A51A-BAB67067237B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6539CF5A-A76C-4953-A51A-BAB67067237B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6539CF5A-A76C-4953-A51A-BAB67067237B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {BD4A6C46-03D4-41CD-AE03-037FC252732D}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
57
第二课_数据类型/第二课_数据类型/Program.cs
Normal file
57
第二课_数据类型/第二课_数据类型/Program.cs
Normal file
@ -0,0 +1,57 @@
|
||||
namespace 第二课_数据类型
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
int Int = 0;
|
||||
Console.Write("Int的值是:");
|
||||
Console.WriteLine(Int);
|
||||
uint Uint = 0;
|
||||
Console.Write("Uint的值是:");
|
||||
Console.WriteLine(Uint);
|
||||
|
||||
short Short = 0;
|
||||
Console.Write("Short的值是:");
|
||||
Console.WriteLine(Short);
|
||||
|
||||
ushort Ushort = 0;
|
||||
Console.Write("Ushort的值是:");
|
||||
Console.WriteLine(Ushort);
|
||||
|
||||
long Long = 0;
|
||||
Console.Write("Long的值是:");
|
||||
Console.WriteLine(Long);
|
||||
|
||||
ulong Ulong = 0;
|
||||
Console.Write("Ulong的值是:");
|
||||
Console.WriteLine(Ulong);
|
||||
|
||||
float Float = 0.0F;
|
||||
Console.Write("Float的值是:");
|
||||
Console.WriteLine(Float);
|
||||
|
||||
double Double = 0.0;
|
||||
Console.Write("Double的值是:");
|
||||
Console.WriteLine(Double);
|
||||
|
||||
decimal Decimal = 0.0M;
|
||||
Console.Write("Decimal的值是:");
|
||||
Console.WriteLine(Decimal);
|
||||
|
||||
char Char = 'A';
|
||||
Console.Write("Char的值是:");
|
||||
Console.WriteLine(Char);
|
||||
|
||||
string String = "这是一个字符串";
|
||||
Console.Write("String的值是:");
|
||||
Console.WriteLine(String);
|
||||
|
||||
bool Bool = false;
|
||||
Console.Write("Bool的值是:");
|
||||
Console.WriteLine(Bool);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
10
第二课_数据类型/第二课_数据类型/第二课_数据类型.csproj
Normal file
10
第二课_数据类型/第二课_数据类型/第二课_数据类型.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
30
第五课_循环语句/while循环/Program.cs
Normal file
30
第五课_循环语句/while循环/Program.cs
Normal file
@ -0,0 +1,30 @@
|
||||
namespace while循环
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("猜数字游戏,数字在" + 0 + "到" + 100 + "之间");
|
||||
|
||||
int 被猜测的数字 = new Random().Next(0,100);//随机生成一个数字,在0到100之间
|
||||
|
||||
int 猜测的数字 = 0;
|
||||
while (猜测的数字!=被猜测的数字)
|
||||
{
|
||||
Console.Write("请输入你猜测的数字:");
|
||||
猜测的数字 = Convert.ToInt32(Console.ReadLine());
|
||||
if(猜测的数字 > 被猜测的数字)
|
||||
{
|
||||
Console.WriteLine("你输入的数字太大了!");
|
||||
}
|
||||
if (猜测的数字 < 被猜测的数字)
|
||||
{
|
||||
Console.WriteLine("你输入的数字太小了!");
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("恭喜你!猜对了!");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
10
第五课_循环语句/while循环/while循环.csproj
Normal file
10
第五课_循环语句/while循环/while循环.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
23
第五课_循环语句/数组/Program.cs
Normal file
23
第五课_循环语句/数组/Program.cs
Normal file
@ -0,0 +1,23 @@
|
||||
namespace 数组
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
int[] ints = new int[10];
|
||||
for (int i = 0; i < ints.Length; i++)
|
||||
{
|
||||
Console.Write(ints[i]+"\t");
|
||||
}
|
||||
Console.WriteLine();
|
||||
for (int i = 0; i < ints.Length; i++)
|
||||
{
|
||||
ints[i] = i * 2;
|
||||
}
|
||||
foreach(int item in ints)
|
||||
{
|
||||
Console.Write(item + "\t");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
第五课_循环语句/数组/数组.csproj
Normal file
10
第五课_循环语句/数组/数组.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
37
第五课_循环语句/第五课_循环语句.sln
Normal file
37
第五课_循环语句/第五课_循环语句.sln
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34004.107
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "第五课_循环语句", "第五课_循环语句\第五课_循环语句.csproj", "{AC443FFF-850C-475E-AF7D-2F64BDC0E963}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "while循环", "while循环\while循环.csproj", "{7B275C38-2015-4752-A0C7-607856E87FE0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "数组", "数组\数组.csproj", "{5F086597-2330-42AD-847B-A9AD1EF4B301}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{AC443FFF-850C-475E-AF7D-2F64BDC0E963}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AC443FFF-850C-475E-AF7D-2F64BDC0E963}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AC443FFF-850C-475E-AF7D-2F64BDC0E963}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AC443FFF-850C-475E-AF7D-2F64BDC0E963}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7B275C38-2015-4752-A0C7-607856E87FE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7B275C38-2015-4752-A0C7-607856E87FE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7B275C38-2015-4752-A0C7-607856E87FE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7B275C38-2015-4752-A0C7-607856E87FE0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5F086597-2330-42AD-847B-A9AD1EF4B301}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5F086597-2330-42AD-847B-A9AD1EF4B301}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5F086597-2330-42AD-847B-A9AD1EF4B301}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5F086597-2330-42AD-847B-A9AD1EF4B301}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {F121C50F-6D08-46ED-B2BB-8161EF768043}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
13
第五课_循环语句/第五课_循环语句/Program.cs
Normal file
13
第五课_循环语句/第五课_循环语句/Program.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace 第五课_循环语句
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
Console.WriteLine("循环执行,第" + i + "次");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
第五课_循环语句/第五课_循环语句/第五课_循环语句.csproj
Normal file
10
第五课_循环语句/第五课_循环语句/第五课_循环语句.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
25
第四课_if语句/第四课_if语句.sln
Normal file
25
第四课_if语句/第四课_if语句.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34004.107
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "第四课_if语句", "第四课_if语句\第四课_if语句.csproj", "{39DDB7D2-98E9-4604-9EC5-D035345D0B5B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{39DDB7D2-98E9-4604-9EC5-D035345D0B5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{39DDB7D2-98E9-4604-9EC5-D035345D0B5B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{39DDB7D2-98E9-4604-9EC5-D035345D0B5B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{39DDB7D2-98E9-4604-9EC5-D035345D0B5B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {860F54DC-178E-4A5B-8F07-4161883FA381}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
24
第四课_if语句/第四课_if语句/Program.cs
Normal file
24
第四课_if语句/第四课_if语句/Program.cs
Normal file
@ -0,0 +1,24 @@
|
||||
namespace 第四课_if语句
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.Write("请输入三角形的第一个边长度:");
|
||||
double a = Convert.ToInt32(Console.ReadLine());
|
||||
Console.Write("请输入三角形的第二个边长度:");
|
||||
double b = Convert.ToInt32(Console.ReadLine());
|
||||
Console.Write("请输入三角形的第三个边长度:");
|
||||
double c = Convert.ToInt32(Console.ReadLine());
|
||||
|
||||
if ((a + b > c) && (a + c > b) && (b + c > a))
|
||||
{
|
||||
Console.WriteLine("三角形成立!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("三角形不成立!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
10
第四课_if语句/第四课_if语句/第四课_if语句.csproj
Normal file
10
第四课_if语句/第四课_if语句/第四课_if语句.csproj
Normal file
@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user