diff --git "a/\346\233\276\345\251\267/Work.sln" "b/\346\233\276\345\251\267/Work.sln" new file mode 100644 index 0000000000000000000000000000000000000000..c33be27c5aecc6db3eb4f16f3cc1bd37df124db4 --- /dev/null +++ "b/\346\233\276\345\251\267/Work.sln" @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1082 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Work", "Work\Work.csproj", "{D4F0655C-6B07-4C7F-AB28-257007CB7261}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D4F0655C-6B07-4C7F-AB28-257007CB7261}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D4F0655C-6B07-4C7F-AB28-257007CB7261}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D4F0655C-6B07-4C7F-AB28-257007CB7261}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D4F0655C-6B07-4C7F-AB28-257007CB7261}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8C1D09C6-1A2B-4419-84E6-5BF0FE63A0CE} + EndGlobalSection +EndGlobal diff --git "a/\346\233\276\345\251\267/Work/App.config" "b/\346\233\276\345\251\267/Work/App.config" new file mode 100644 index 0000000000000000000000000000000000000000..731f6de6c291e303814b02808f34140fe560e8e4 --- /dev/null +++ "b/\346\233\276\345\251\267/Work/App.config" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\346\233\276\345\251\267/Work/Program.cs" "b/\346\233\276\345\251\267/Work/Program.cs" new file mode 100644 index 0000000000000000000000000000000000000000..d4af744b09fcabdf04a9e0d5031e2883e2a2f36e --- /dev/null +++ "b/\346\233\276\345\251\267/Work/Program.cs" @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Work +{ + class Program + { + static void Main(string[] args) + { + int[] arr = new int[10];//声明一个int类型的数组 + for (int x = 0; x < arr.Length; x++)//用于循环输出 + { + Console.WriteLine("请输入数字:"); + int num = int.Parse(Console.ReadLine());//键盘输入一个数字 + for (int i = 0; i < arr.Length; i++)//循环向数组中添加元素 + { + if (arr[i] == 0) + { + arr[i] = num;//给数组赋值 + break;//跳出循环 + } + } + } + for (int j = 0; j < arr.Length; j++)//循环输出数组 + { + Console.WriteLine(string.Format("数组第{0}:{1}", j + 1, arr[j])); + } + Console.ReadLine(); + + int[,] ary = new int[3, 5] + { + { 1,3,4,5,6}, + { 4,6,7,8,9}, + { 6,8,9,0,8} + };//初始化一个多维数组 + foreach(int elements in ary) + Console.WriteLine("{0}",elements); + int a = ary[2, 4]; + Console.WriteLine("第二行第四列的数字是{0}",a); + + + + } + } +} diff --git "a/\346\233\276\345\251\267/Work/Properties/AssemblyInfo.cs" "b/\346\233\276\345\251\267/Work/Properties/AssemblyInfo.cs" new file mode 100644 index 0000000000000000000000000000000000000000..53d2ccc11f78174a192e5365c4c780e75dc93894 --- /dev/null +++ "b/\346\233\276\345\251\267/Work/Properties/AssemblyInfo.cs" @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("Work")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Work")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("d4f0655c-6b07-4c7f-ab28-257007cb7261")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 +// 方法是按如下所示使用“*”: : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git "a/\346\233\276\345\251\267/Work/Work.csproj" "b/\346\233\276\345\251\267/Work/Work.csproj" new file mode 100644 index 0000000000000000000000000000000000000000..6acc947a69abe6c0483ff1650e7d242755cc9dd9 --- /dev/null +++ "b/\346\233\276\345\251\267/Work/Work.csproj" @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {D4F0655C-6B07-4C7F-AB28-257007CB7261} + Exe + Work + Work + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file