Advertisement
Guest User

Untitled

a guest
Feb 14th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string text = Console.ReadLine();
  14. var summ = 0;
  15. for (int i = 0; i < text.Length; i++)
  16. {
  17. if (text[i] == 'a')
  18.  
  19. Console.WriteLine(summ = summ + 1);
  20.  
  21. else if (text[i] == 'e')
  22.  
  23. Console.WriteLine(summ = summ + 2);
  24.  
  25. else if (text[i] == 'i')
  26.  
  27. Console.WriteLine(summ = summ + 3);
  28.  
  29. else if (text[i] == 'o')
  30.  
  31. Console.WriteLine(summ = summ + 4);
  32.  
  33. else if (text[i] == 'u')
  34.  
  35. Console.WriteLine(summ = summ + 5);
  36. }
  37. Console.WriteLine(summ);
  38.  
  39. }
  40.  
  41.  
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement