Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Illuminati
- {
- class Illuminati
- {
- public static void Main(string[] args)
- {
- string input = Console.ReadLine();
- int countA = 0;
- int countE = 0;
- int countI = 0;
- int countO = 0;
- int countU = 0;
- int sum = 0;
- foreach(var ch in input)
- {
- switch(ch)
- {
- case 'a': countA += 1; break;
- case 'A': countA += 1; break;
- case 'e': countE += 1; break;
- case 'E': countE += 1; break;
- case 'i': countI += 1; break;
- case 'I': countI += 1; break;
- case 'o': countO += 1; break;
- case 'O': countO += 1; break;
- case 'u': countU += 1; break;
- case 'U': countU += 1; break;
- }
- }
- Console.WriteLine(countA + countE + countI + countO + countU);
- sum = countA * 65 + countE * 69 + countI * 73 + countO * 79 + countU * 85;
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment