Question
Hello, this is C++. I really need help with this program please. Here is the program bellow: Write a program that displays a simulated paycheck.
Hello, this is C++. I really need help with this program please. Here is the program bellow:
Write a program that displays a simulated paycheck. The program should ask the user to enter the date, the payee's name, and the amount of the check. It should then display a simulated check with the dollar amount spelled out, as shown here:
Date: 12/24/2016
Pay to the order of: John Phillips $1920.85 One thousand nine hundred twenty and 85 cents
You may assume the amount is no greater than $10000. Be sure to format the numeric value of the check in fixed-point notation with two decimal places of precision. Be sure he decimal place always displays, even when the number is zero or has no fractional part. Use either C-strings or string objects in this program.
And here is a sample that can help with completing the program below:
#includeusing namespace std; int buffer = 0, partFunc[3] = {0, 0, 0}, part[3] = {0, 0, 0}, a, b, c, d; long input, nFake = 0; const char ones[][20] = {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"}; const char tens[][20] = {"", "ten", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"}; void convert(int funcVar); int main() { cout > input; nFake = input; buffer = 0; while (nFake) { part[buffer] = nFake % 1000; nFake /= 1000; buffer++; } if (buffer == 0) { cout = 100) { a = funcVar / 100; b = funcVar % 100; if (b) cout
And here are how it should look when completed:
Ask me if you have any questions and I need this completed asap please.
Enter the date: 12/17/2017 Enter the payee: Bernie Ku Enter the amount: 1920.85 Pay to the order of: Bernie Ku Date: 12/17/2017 $1920.85 One thousand Nine hundred Twenty and 85 cents Enter the date: 12/17/2017 Enter the payee: Tom Cruise Enter the amount: 9999.00 Pay to the order of Tom Cruise Date: 12/17/2017 $9999.00 Nine thousand Nine hundred Nine ty Nine and cents Enter the date 12/18/2017 Enter the payee: Jack Wild Enter the amount: 1312.11 Pay to the order of: Jack Wild Date: 12/18/2017 $1312. 11 One thousand Three hundred Twelve and 11 cents Enter the date: 12/16/2017 Enter the payee: Mark Burns Enter the amount: 200000 Invalid anount: amount cannot be negative or over 10000
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started