Question: using Xcode and its a c++ program please make sure the code works in macOS Xcode. Thanks Assignments Write a C++ program that will allow

using Xcode
and its a c++ program
using Xcode and its a c++ program please make sure the code
please make sure the code works in macOS Xcode. Thanks

Assignments Write a C++ program that will allow the user to enter a currency amount and validate that it is in a correct format. For purposes of this program, the correct format of curency is the following: \$1234 The $ sign followed by an integer number \$1234.56 The $ sign followed by a real number. If a decimal point is included in the number, there must be exactly 2 digits to the right of the decimal point $1,234.56 There can be commas to the right of the decimal point, but they must always be in the correct place (hint - there must be 3 integer values to the right of the comma. No commas after the decimal point) - $1,234.56 There can be a negative sign before the dollar sign 12e A one or two digit integer followed by a cent sign. Create a function that will do the validation and if valid, will convert the number to a "double" and return it to the calling function. Your main function should do the following: 1. Prompt the user to end a currency amount 2. Read the input into a C-Style string 3. Call the function you created above to convert the amount. If the amount is valid, then display the amount in the form of a real (double) amount 4. Prompt the user if they wish to enter a new value (yes / no)

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!