Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace tESt
- {
- class Program
- {
- static void Main(string[] args)
- {
- var text = Console.ReadLine();
- var sum = 0;
- for (int i = 0; i < text.Length; i++) // ще върне дълйината на текта
- {
- char curent = text[i];
- if (curent == 'a')
- {
- sum += 1;
- }
- if (curent == 'e')
- {
- sum += 2;
- }
- if (curent == 'i')
- {
- sum += 3;
- }
- if (curent == 'o')
- {
- sum += 4;
- }
- if (curent == 'u')
- {
- sum += 5;
- }
- }
- Console.WriteLine(sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment