Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- class Program
- {
- static void Main()
- {
- string inputraw = Console.ReadLine();
- string[] input = inputraw.Split(", ");
- int[] inputint = new int[inputClean.Length];
- for (int i = 0; i < input.Length; i++)
- {
- inputint[i] = int.Parse(input[i]);
- }
- Array.Sort(inputint);
- Array.Reverse(inputint);
- // foreach (int inaput in inputint) { Console.Write($"{inaput}, "); }
- for (int i = 0; i < inputClean.Length; i++)
- {
- if (i == inputint.Length - 1)
- {
- Console.Write($"{inputint[i]}");
- }
- else { Console.Write($"{inputint[i]}, "); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment