Archived
1
0
This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SomeLab/15_4/Program.cs
2025-11-15 20:25:57 +08:00

37 lines
1.1 KiB
C#

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);
}
}
}