Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that will demonstrate some of the C++ Library Functions, Stream Manipulators, and Selection Control Structures. The user will be given a menu

image text in transcribed

Write a program that will demonstrate some of the C++ Library Functions, Stream Manipulators, and Selection Control Structures. The user will be given a menu of four choices. They can input a 1 for finding Cosines, 2 for finding Logarithms, 3 for converting between Decimal and Hexadecimal, or 4 to change the format of a cstring date. You must use the proper functions and/or stream manipulators to find the answers 1.If the user picks the cosine, ask them if they want to find the cosine, arc cosine, or hyperbolic cosine. Then input a floating point number (in radians) and find and print to three decimal places the proper type of cosine If the user picks the logarithms, ask them if they want to find the common logarithm or the natural logarithm. Then input a floating point number and find and print to three decimal places and a plus or minus sign (for positive or negative numbers) the proper type of logarithm. If the user picks the conversion, ask them if they want to convert decimal to hexadecimal or hexadecimal to decimal. If they pick decimal to hexadecimal, ask them if they want to use lowercase or uppercase letters in the printing of the hexadecimal number. Use boolean input, so input the answer as true or false and put the user's answer in a boolean alphabetic variable. Then input a whole number in the proper base Print the inputted number in the user's base and in the converted base. Use the prefix for printing the hexadecimal numbers. If the user picks the cstring date, input a cstring date in the form mm/dd/yyyy to convert to the form mm-dd-yyyy. Use cstring functions for tokens and concatenating. Divide the cstring into three tokens and concatenate the three cstring tokens together with the - between the month and day and the day and year. Print the newly formatted date 4 If you want to use a loop in the program for multiple runs that is fine, but you can write it so it does one thing per run if you wish. Run your program with all of the following sets of data, showing all possibilities work correctly. Submit your .cpp main program and the output .txt saved (copy & paste from console) into a plain text file. Include in the program a full1 paragraph of documentation (at least 4 lines). Supply extra documentation (at least 5 comments) throughout for all of the not easily understandable lines of code (especially on how you used the library functions or stream manipulators)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago