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