Question: Write a program that creates a file that has simulated paychecks. The program should enter a random date in 2023, the payee's name from the

Write a program that creates a file that has simulated paychecks. The program should enter a random date in 2023, the payee's name from the text file given with a name of "names.txt", and a random amount for the check (up to $10,000). It should then display a simulated check with the dollar amount spelled out, as shown here:

------------------------------------------------------------------------------------------------------------------------------

Check Number: [sequential starting with #1] Date: 11/24/2023

Pay to the Order of: John Phillips $1920.85

One thousand nine hundred twenty and 85 cents

Memo: Paycheck Signature: [Your Name]

--------------------------------------------------------------------------------------------------------------------------------

Be sure to format the numeric value of the check in fixed-point notation with two decimal places of precision. Be sure the decimal place always displays, even when the number is zero or has no fractional part. Use either C-strings or string class objects in this program.

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!