Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write C++ program 1. Count cash: Write a program that reads the amount of coins collected at the end of each day of a month

write C++ program image text in transcribed
1. Count cash: Write a program that reads the amount of coins collected at the end of each day of a month in a local supermarket and calculates the total amount in fils (1 AED = 100 fils). The program reads the data for the entire month from the file coins.txt (assume the month has 30 days). The input file has one line for each day where each line has: number of fils, space, number of 5-fils, space, number of 10-fils, space, number of 25-fils, space, and number of 50-fils. Make sure that the total amount is displayed with exactly two decimals. For the sake of testing your program consider an input file where the first 29 lines, each contains 00000 and the last line are 11111. This means the file is for a month where no coins where collected in the first 29 days. The output should be 0.91 AED. Now if you test your program for having 0 0000 for the first 28 days and for the last 2 days, we have: 77 117 430 705 520 89 320 414 833 850 Then the answer is shown below: Sample run (with the above file): Total amount collected is: AED 1178.32 execution time: 0.263 S Process returned @ (exe) Press any key to continue

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

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

Explain the accounting information processing cycle.

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago