Advertisement
Guest User

Untitled

a guest
Feb 9th, 2017
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace невнев
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10.  
  11. string word = Console.ReadLine().ToLower();
  12. var letters = new string[] {"a" , "e", "i", "o", "u"};
  13. var numbers = new int[] { 1, 2, 3, 4, 5 };
  14. var sum = 0;
  15. for (int i = 0; i < letters.Length; i++)
  16. {
  17. if (word.Contains(letters[i]))
  18. {
  19.  
  20. sum += numbers[i];
  21. }
  22. }
  23. Console.WriteLine(sum);
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement