Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- public static void Main(string[] args)
- {
- string text = Console.ReadLine();
- int sum = 0;
- for (int i = 0; i < text.Length; i++)
- {
- if(text[i]=='a')
- {
- sum += 1;
- }
- else if(text[i]=='e')
- {
- sum += 2;
- }
- else if (text[i] == 'i')
- {
- sum += 3;
- }
- else if (text[i] == 'o')
- {
- sum += 4;
- }
- else if (text[i] == 'u')
- {
- sum += 5;
- }
- }
- Console.WriteLine(sum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement