Advertisement
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;
- using System.Threading.Tasks;
- namespace ConsoleApp27
- {
- class Program
- {
- static void Main(string[] args)
- {
- string newS = " ", last = " ",newSS=" ";
- int len = 0;
- string s1 = Console.ReadLine();
- string s2 = Console.ReadLine();
- string s3 = Console.ReadLine();
- int check = s1.CompareTo(s2);
- if(check>0)
- {
- newS = s2 + ", " + s1;
- last = s1;
- }
- else
- {
- newS = s1 + ", " + s2;
- last = s2;
- }
- check = newS.CompareTo(s3);
- if(check>0)
- {
- newSS = s3 + ", " + newS;
- }
- else
- {
- if(last.CompareTo(s3)>0)
- {
- newSS = newS + ", " + s3;
- }
- else
- {
- len = newS.Length - last.Length;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement