Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This code is in C++. Please read and follow instructions carefully. Thank you Write a function that determines if two strings are anagrams. The function
This code is in C++. Please read and follow instructions carefully. Thank you
Write a function that determines if two strings are anagrams. The function should not be case sensitive and should disregard any punctuation or spaces. Two strings are anagrams if the letters can be rearranged to form each other. For example, "Eleven plus two" is an anagram of "Twelve plus one". Each string contains one "v", three "e's", two 'I's", etc. You may use either the string class or a C-style string. Either way, you may not use built-in C++ functions that we have NOT discussed in lecture. Write a program that inputs two strings and calls your function to determine whether or not the strings are anagrams and prints the result. REQUIRED:You MUST use strings to write this program. You may not use any C++ functions that we have NOT discussed in lecture. The program should print a string of text to the terminal before getting each line of input from the user. A session should look like one of the following examples (including whitespace and formatting), with possibly different numbers and numbers of asterisks in the output: Enter first string: Eleven plus two Enter second string: Twelve plus three The strings are not anagrams. OR Enter first string: Rats and Mice Enter second string: in cat's dream. The strings are anagrams. The strings printed by the program should include a newline at the end, but no other trailing whitespace (whitespace at the end of the line)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started