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 ConsoleApplication9
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Unesite broj riječi: ");
- int vel=int.Parse(Console.ReadLine());
- string[] niz = new string[vel];
- Console.WriteLine("Unesite {0}, riječi", vel);
- for (int i = 0; i < vel; i++)
- {
- niz[i] = Console.ReadLine();
- }
- Array.Sort(niz, delegate(string s1, string s2) { return String.Compare(s1, s2); });
- foreach (string i in niz)
- Console.WriteLine(i);
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment