-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (30 loc) · 873 Bytes
/
Program.cs
File metadata and controls
31 lines (30 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SolidPrincipile
{
class Program
{
static void Anagram()
{
Console.WriteLine("Enter Word 1");
string word1 = Console.ReadLine();
Console.WriteLine("Enter Word 2");
string word2 = Console.ReadLine();
char[] char1 = word1.ToCharArray();
char[] char2 = word2.ToCharArray();
Array.Sort(char1);
Array.Sort(char2);
string newword1 = new string(char1);
string newword2 = new string(char2);
Console.WriteLine(newword1 + "" + newword2);
}
static void Main(string[] args)
{
Anagram();
Console.Read();
}
}
}