Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

C++代写 | C++ Functions & Streams

C++代写 | C++ Functions & Streams


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.


  1. 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.


  1. 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.


  1. 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.


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 full 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).