diff --git "a/\351\237\251\345\235\244/\346\225\260\347\273\204split.sln" "b/\351\237\251\345\235\244/\346\225\260\347\273\204split.sln" new file mode 100644 index 0000000000000000000000000000000000000000..01c2c4ffb489797fb6272ade8b0158a7c77f3260 --- /dev/null +++ "b/\351\237\251\345\235\244/\346\225\260\347\273\204split.sln" @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30011.22 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "split", "数组split\split.csproj", "{54CDD1D7-D261-4666-97CE-CF2ECD3C2899}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {54CDD1D7-D261-4666-97CE-CF2ECD3C2899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {54CDD1D7-D261-4666-97CE-CF2ECD3C2899}.Debug|Any CPU.Build.0 = Debug|Any CPU + {54CDD1D7-D261-4666-97CE-CF2ECD3C2899}.Release|Any CPU.ActiveCfg = Release|Any CPU + {54CDD1D7-D261-4666-97CE-CF2ECD3C2899}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {2C2A0E0F-4C36-4A3A-82F8-09BCC92C3534} + EndGlobalSection +EndGlobal diff --git "a/\351\237\251\345\235\244/\346\225\260\347\273\204split/Program.cs" "b/\351\237\251\345\235\244/\346\225\260\347\273\204split/Program.cs" new file mode 100644 index 0000000000000000000000000000000000000000..90b5f2e290a9ef6fac64c6035e2466c68a670952 --- /dev/null +++ "b/\351\237\251\345\235\244/\346\225\260\347\273\204split/Program.cs" @@ -0,0 +1,64 @@ +using System; + +namespace 数组split +{ + + class Program + { + + + static void Main(string[] args) + {//数组 + string[] s = new string[3]; + string[] f = { "杨玉环", "貂蝉", "西施" }; + string[] y = new string[3] { "裴擒虎", "云中君", "百里玄策" }; + + Console.WriteLine(s); + Console.WriteLine(f); + Console.WriteLine(y); + + //多维数组 + double[,] many = { { 98, 89 }, { 98.5, 89.5 }, { 95.5, 89 } }; + for (int i = 0; i < many.GetLength(0); i++) + { + Console.WriteLine("第" + (i + 1) + "个学生成绩:"); + for (int j = 0; j < many.GetLength(1); j++) + { + Console.Write(many[i, j] + " "); + } + Console.WriteLine(); + + //foreach + double[] points = { 80, 88, 86, 90, 75.5 }; + double weight = 0; + double height = 0; + foreach (double point in points) + { + weight = weight + point; + } + height = weight / points.Length; + Console.WriteLine("总成绩为:" + weight); + Console.WriteLine("平均成绩为:" + height); + string[] chinese = { "45", "35" }; + string jj = "11"; + foreach (string ass in chinese) + { + jj = jj + chinese; + } + Console.WriteLine(jj); + + string a = "jdfkleiovikd"; + + + string[] v = a.Split("f"); + foreach (var item in v) + { + Console.WriteLine(item); + } + + + + } + } + } +} diff --git "a/\351\237\251\345\235\244/\346\225\260\347\273\204split/split.csproj" "b/\351\237\251\345\235\244/\346\225\260\347\273\204split/split.csproj" new file mode 100644 index 0000000000000000000000000000000000000000..9acff6d2afa8169f3a18e0c49b2b04a9860af7b4 --- /dev/null +++ "b/\351\237\251\345\235\244/\346\225\260\347\273\204split/split.csproj" @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + +