Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

language is c++ and please try to make it as much simple as possible. Thanks! Currency Input 51234 The 5 sign folowed by an intoger

language is c++ and please try to make it as much simple as possible. Thanks! image text in transcribed
Currency Input 51234 The 5 sign folowed by an intoger number 31234. 56 The 5 sign followed by a real number. If a decinal point is included in the number, there must be enacty 2 digts to the nght of fhe decimai point $1,23.56 There can be a negative sign before the dollar sign 12s 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 ieput 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 (doehle) amouise 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

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

Students also viewed these Databases questions

Question

4. Does non-nativeness make sense?

Answered: 1 week ago

Question

What are negative messages? (Objective 1)

Answered: 1 week ago