>It will then store the alphabetical character into an array ignoring all other character
>compare to see if they have the same alphabetical characters in there.
so first you fetch the alphabets from the input and store it in an array and then check array for alphabets again?? it doesn't make sense to me
do you mean if the alphabets stored in array make any word it will say its an 'anagram'?
sorry, didn't mean to confuse you.
the user will be asked to enter a sentence(or anything)
then the user will be asked to enter another sentence.
It will then compare the 2 sentence to see if they have the same characters.
If my explanation doesn't do the job then here is the assignment, hope it is more clear.
TITLE
DETECTING ANAGRAMS
INTRODUCTION
Two or more strings are anagrams if they contain exactly the same letters, ignoring capitalization, punctuation, and spaces. For example, "Information superhighway" and "New utopia? Horrifying sham" are anagrams, as are "ab123ab" and "%%b b*aa". Note that two lines that contain no letters are anagrams.
DESCRIPTION
Write a program that reads two lines of input from the terminal and determines and reports if the lines are anagrams.
INPUT
Input lines will consist of letters, blanks, and punctuation, like this: "New utopia? Horrifying sham". The maximum length of an input line is 60 characters.
OUTPUT
The program will prompt for two input lines and will report whether or not two lines are anagrams.
ERRORS
Your program may assume that the input is as described; it need not detect any errors.
EXAMPLE
Several runs of the program might look like this:
csh> agm
Enter two lines that might be anagrams:
--> Eleven plus two
--> Twelve plus one
The two strings are anagrams.
csh> agm
Enter two lines that might be anagrams:
--> This is a string.
--> Another string
The two strings are NOT anagrams.
csh> agm
Enter two lines that might be anagrams:
--> Snooze alarms
--> Alas, no more Z's.
The two strings are anagrams.