Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int.TryParse(Console.ReadLine(), out int lines);
- int[] sequence = new int[lines];
- for (int i = 0;i < lines; i++)
- {
- string input = Console.ReadLine();
- int sum = 0;
- for (int j = 0; j < input.Length; j++)
- {
- if (input[j] == 'A' || input[j] == 'a' || input[j] == 'E' || input[j] == 'e'
- || input[j] == 'I' || input[j] == 'i' || input[j] == 'O' || input[j] == 'o'
- || input[j] == 'U' || input[j] == 'u')
- {
- sum += input[j] * input.Length;
- }
- else
- {
- sum += input[j] / input.Length;
- }
- }
- sequence[i] = sum;
- }
- Array.Sort(sequence);
- for (int k = 0; k < sequence.Length; k++)
- {
- Console.WriteLine(sequence[k]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement