Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics.CodeAnalysis;
- using System.Linq;
- using System.Numerics;
- namespace SoftuniExercisesWithVariables
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter the number of lines you are about to enter: ");
- int lines = int.Parse(Console.ReadLine());
- List<int> numbersList = new List<int>();
- string input = "";
- while (lines > 0)
- {
- int sum = 0;
- input = Console.ReadLine();
- int length = input.Length;
- foreach(char i in input)
- {
- switch (i)
- {
- case 'a':
- case 'e':
- case 'i':
- case 'o':
- case 'u':
- sum += ((int)i*length);
- break;
- default:
- sum += ((int)i/length);
- break;
- }
- }
- numbersList.Add(sum);
- sum = 0;
- lines--;
- }
- numbersList.Sort();
- foreach(int k in numbersList)
- {
- Console.WriteLine(k);
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment