Question: Anagrams An anagram is a word play that transforms one word or phrase into another by rearranging the letters of the original word or


Anagrams An anagram is a word play that transforms one word or phrase into another by rearranging the letters of the original word or phrase. Writers often use anagrams as pseudonyms and character names, while musicians often use them for song or album titles. Some scientists use anagrams of their discoveries as placeholder terms before their research is completed. For example, a British naturalist Sir Peter Scott dubbed the Loch Ness Monster 'Nessiteras rhombopteryx' which is an anagram of 'Monster hoax by Sir Peter S'. Write a program that reads a line and determines whether the line that follows is an anagram. Remember that anagrams are case insensitive and must contain the same characters as the original, ignoring any whitespace or punctuation characters. Example 1: Enter line: Madam Curie Enter anagram: RADIUM MACE Anagram! Example 2: Enter line: Othello Enter anagram: Hello Not an anagram. Example 3: Enter line: This is what matters... Enter anagram: !WhatMattersIsThis! Anagram! /home/anag Console
Step by Step Solution
3.34 Rating (166 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
