111
This commit is contained in:
11
15_4/15_4.csproj
Normal file
11
15_4/15_4.csproj
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>_15_4</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
25
15_4/15_4.sln
Normal file
25
15_4/15_4.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36623.8 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "15_4", "15_4.csproj", "{A5D84909-CEAE-418D-8431-F44DFC39C3AF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A5D84909-CEAE-418D-8431-F44DFC39C3AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A5D84909-CEAE-418D-8431-F44DFC39C3AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A5D84909-CEAE-418D-8431-F44DFC39C3AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A5D84909-CEAE-418D-8431-F44DFC39C3AF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8D89CBFF-8DF9-4F24-8802-9BF5740164E4}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
36
15_4/Program.cs
Normal file
36
15_4/Program.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace _15_4
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
int countA = 0, countE = 0, countI = 0, countO = 0, countU = 0, countALL = 0;
|
||||
string str = Console.ReadLine();
|
||||
str = str.ToUpper();
|
||||
char[] chars = str.ToCharArray();
|
||||
foreach (char c in chars)
|
||||
{
|
||||
countALL++;
|
||||
switch (c)
|
||||
{
|
||||
case 'A': countA++; break;
|
||||
case 'E': countE++; break;
|
||||
case 'I': countI++; break;
|
||||
case 'O': countO++; break;
|
||||
case 'U': countU++; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
Console.WriteLine(countALL);
|
||||
Console.WriteLine(str);
|
||||
Console.WriteLine("A:{0}", countA);
|
||||
Console.WriteLine("E:{0}", countE);
|
||||
Console.WriteLine("I:{0}", countI);
|
||||
Console.WriteLine("O:{0}", countO);
|
||||
Console.WriteLine("U:{0}", countU);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user