Update main.c

updated anagram function