Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace _01._Encrypt__Sort_and_Print_Array
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- string[] input = new string[n];
- int[] sum = new int[n];
- for (int i = 0; i < n; i++)
- {
- input[i] = Console.ReadLine();
- int currentSum = 0;
- for (int j = 0; j < input[i].Length; j++)
- {
- if ( input[i][j] == 'a' || input[i][j] == 'e' || input[i][j] == 'i' || input[i][j] == 'o' || input[i][j] == 'u')
- {
- currentSum += input[i][j] * input[i].Length;
- }
- else
- {
- currentSum += input[i][j] / input[i].Length;
- }
- }
- sum[i] = currentSum;
- }
- Array.Sort(sum);
- foreach (int i in sum)
- {
- Console.WriteLine(i);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment