Write a program to find whether the 2 given strings are anagrams or not.

Write a program to find whether the 2 given strings are anagrams or not.

Anagrams are words or phrases made by mixing up the letters of other words or phrases,

 Input and Output Format:

Input consists of 2 string. Assume that all characters in the string are lowercase letters or spaces and the maximum length of the string is 100.

Refer sample input and output for formatting specifications.

All text in bold corresponds to input and the rest corresponds to output.

Sample Input 

Enter the first string

codeatglance

Enter the second string

blog

OUTPUT

 codeatglance and blog are not anagrams

Sample Input and Output 2:

Enter the first string

the eyes

Enter the second string

they see

the eyes and they see are anagrams

Leave a Reply

Your email address will not be published. Required fields are marked *