Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- namespace EncryptSortAndPrintArray
- {
- class Program
- {
- static void Main(string[] args)
- {
- int stringsCount = int.Parse(Console.ReadLine());
- int[] sums = new int[stringsCount];
- char[] vowels = { 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U' };
- for (int i = 0; i < stringsCount; i++)
- {
- string text = Console.ReadLine();
- int currSum = 0;
- for (int j = 0; j < text.Length; j++)
- {
- bool isMatch = false;
- for (int k = 0; k < vowels.Length; k++)
- {
- if (text[j] == vowels[k])
- {
- isMatch = true;
- break;
- }
- }
- if (isMatch == true)
- {
- currSum += text[j] * text.Length;
- }
- else
- {
- currSum += text[j] / text.Length;
- }
- }
- sums[i] = currSum;
- }
- Array.Sort(sums);
- for (int i = 0; i < sums.Length; i++)
- {
- Console.WriteLine(sums[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement