Question: Write a complete C++ program that will use a menu and several decision structures. Ask the user if they want to enter character, integer, or

 Write a complete C++ program that will use a menu and

Write a complete C++ program that will use a menu and several decision structures. Ask the user if they want to enter character, integer, or string data. Present the choice to the user in menu form. Read in the user's response. Use a switch statement based on the menu choice to determine the next action: If the user chose to enter character data: (use 2 separate ifs) Prompt the user for the character input and read in the response. If the character value is less than or equal to the character 'z', write out The input character and the message "is less than z". If the character value is greater than or equal to 'a', write out the character And the message "is greater than a". If the user chose to enter integer data: (use one if/else if) Prompt the user for the integer input and read in the value. If the input value is negative, write out the number and the message "is negative". Otherwise, if the value is positive, write out the number and the message "is positive". Otherwise, write out the number and the message "is zero". If the user chose to enter string data: (use one if/else) Prompt the user for input and store their response into a string variable. Prompt the user for a second string input and store the new response into a second string variable. If the first string is less than the second, write out a message in the form string1_contents "is less than "string2_contents, where the _contents are the actual contents of the string variables. Otherwise, write out a message saying "both strings contained "string_contents, where string_contents is the contents of either string variable. Write a complete C++ program that will use a menu and several decision structures. Ask the user if they want to enter character, integer, or string data. Present the choice to the user in menu form. Read in the user's response. Use a switch statement based on the menu choice to determine the next action: If the user chose to enter character data: (use 2 separate ifs) Prompt the user for the character input and read in the response. If the character value is less than or equal to the character 'z', write out The input character and the message "is less than z". If the character value is greater than or equal to 'a', write out the character And the message "is greater than a". If the user chose to enter integer data: (use one if/else if) Prompt the user for the integer input and read in the value. If the input value is negative, write out the number and the message "is negative". Otherwise, if the value is positive, write out the number and the message "is positive". Otherwise, write out the number and the message "is zero". If the user chose to enter string data: (use one if/else) Prompt the user for input and store their response into a string variable. Prompt the user for a second string input and store the new response into a second string variable. If the first string is less than the second, write out a message in the form string1_contents "is less than "string2_contents, where the _contents are the actual contents of the string variables. Otherwise, write out a message saying "both strings contained "string_contents, where string_contents is the contents of either string variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!