SlideShare a Scribd company logo
1 of 1
Download to read offline
Write a complete C++ program (including comments) to compute the contents of a cash register at
the end of the day.
At the start of the day, your program should ask the user for:
Total starting amount of cash in the register.
Your program should then loop for 5 customers.
For each customer (each iteration in the loop):
Ask the total value of the bill. How much does the user owe?
Check if the user is paying with cash or debit card
If the user is paying with cash, add the cash paid to the register cash.
If the user is paying with a debit card, ask if the user wants cash back. If yes, ask for the amount of
cash back and subtract this amount from the register.

More Related Content

More from advancesystem

Write a class called Window that contains the following info.pdf
Write a class called Window that contains the following info.pdfWrite a class called Window that contains the following info.pdf
Write a class called Window that contains the following info.pdfadvancesystem
 
Write a C code that uses struct to create a userdefined typ.pdf
Write a C code that uses struct to create a userdefined typ.pdfWrite a C code that uses struct to create a userdefined typ.pdf
Write a C code that uses struct to create a userdefined typ.pdfadvancesystem
 
Write a 12 page report on igneous rock and how they are m.pdf
Write a 12 page report on igneous rock and  how they are m.pdfWrite a 12 page report on igneous rock and  how they are m.pdf
Write a 12 page report on igneous rock and how they are m.pdfadvancesystem
 
WQ4 Coevolution of Central American ants in the Pseudomyrme.pdf
WQ4 Coevolution of Central American ants in the Pseudomyrme.pdfWQ4 Coevolution of Central American ants in the Pseudomyrme.pdf
WQ4 Coevolution of Central American ants in the Pseudomyrme.pdfadvancesystem
 
With the following companies Apple Caterpillar Consolidat.pdf
With the following companies Apple Caterpillar Consolidat.pdfWith the following companies Apple Caterpillar Consolidat.pdf
With the following companies Apple Caterpillar Consolidat.pdfadvancesystem
 
Would the current answer be considered correct 2 Identify .pdf
Would the current answer be considered correct 2 Identify .pdfWould the current answer be considered correct 2 Identify .pdf
Would the current answer be considered correct 2 Identify .pdfadvancesystem
 
WQ3 Considering that you know about natural selection is o.pdf
WQ3 Considering that you know about natural selection is o.pdfWQ3 Considering that you know about natural selection is o.pdf
WQ3 Considering that you know about natural selection is o.pdfadvancesystem
 
would be earned How much of the total is simple interest an.pdf
would be earned How much of the total is simple interest an.pdfwould be earned How much of the total is simple interest an.pdf
would be earned How much of the total is simple interest an.pdfadvancesystem
 
write 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdf
write 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdfwrite 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdf
write 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdfadvancesystem
 
World vegetation maps and world climate maps are very simila.pdf
World vegetation maps and world climate maps are very simila.pdfWorld vegetation maps and world climate maps are very simila.pdf
World vegetation maps and world climate maps are very simila.pdfadvancesystem
 
Working with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdfWorking with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdfadvancesystem
 
Working individually or in pairs you will apply what you ha.pdf
Working individually or in pairs you will apply what you ha.pdfWorking individually or in pairs you will apply what you ha.pdf
Working individually or in pairs you will apply what you ha.pdfadvancesystem
 
Without using a function write the JavaScript code so that w.pdf
Without using a function write the JavaScript code so that w.pdfWithout using a function write the JavaScript code so that w.pdf
Without using a function write the JavaScript code so that w.pdfadvancesystem
 
with thefour approches to Internation human resource managem.pdf
with thefour approches to Internation human resource managem.pdfwith thefour approches to Internation human resource managem.pdf
with thefour approches to Internation human resource managem.pdfadvancesystem
 
Why did the marine trophic index continue to decline after t.pdf
Why did the marine trophic index continue to decline after t.pdfWhy did the marine trophic index continue to decline after t.pdf
Why did the marine trophic index continue to decline after t.pdfadvancesystem
 
With regard to the Pacific the phrase tyranny of distance.pdf
With regard to the Pacific the phrase tyranny of distance.pdfWith regard to the Pacific the phrase tyranny of distance.pdf
With regard to the Pacific the phrase tyranny of distance.pdfadvancesystem
 
With or without Dox the amount of virus stays the same Does.pdf
With or without Dox the amount of virus stays the same Does.pdfWith or without Dox the amount of virus stays the same Does.pdf
With or without Dox the amount of virus stays the same Does.pdfadvancesystem
 
Wildhorse Co had the following assets on January 12025 Du.pdf
Wildhorse Co had the following assets on January 12025 Du.pdfWildhorse Co had the following assets on January 12025 Du.pdf
Wildhorse Co had the following assets on January 12025 Du.pdfadvancesystem
 
With respect to the shoulder latissimus dorsi is a twojoin.pdf
With respect to the shoulder latissimus dorsi is a twojoin.pdfWith respect to the shoulder latissimus dorsi is a twojoin.pdf
With respect to the shoulder latissimus dorsi is a twojoin.pdfadvancesystem
 
Why should organizations be interested in ISO 20400 What ar.pdf
Why should organizations be interested in ISO 20400 What ar.pdfWhy should organizations be interested in ISO 20400 What ar.pdf
Why should organizations be interested in ISO 20400 What ar.pdfadvancesystem
 

More from advancesystem (20)

Write a class called Window that contains the following info.pdf
Write a class called Window that contains the following info.pdfWrite a class called Window that contains the following info.pdf
Write a class called Window that contains the following info.pdf
 
Write a C code that uses struct to create a userdefined typ.pdf
Write a C code that uses struct to create a userdefined typ.pdfWrite a C code that uses struct to create a userdefined typ.pdf
Write a C code that uses struct to create a userdefined typ.pdf
 
Write a 12 page report on igneous rock and how they are m.pdf
Write a 12 page report on igneous rock and  how they are m.pdfWrite a 12 page report on igneous rock and  how they are m.pdf
Write a 12 page report on igneous rock and how they are m.pdf
 
WQ4 Coevolution of Central American ants in the Pseudomyrme.pdf
WQ4 Coevolution of Central American ants in the Pseudomyrme.pdfWQ4 Coevolution of Central American ants in the Pseudomyrme.pdf
WQ4 Coevolution of Central American ants in the Pseudomyrme.pdf
 
With the following companies Apple Caterpillar Consolidat.pdf
With the following companies Apple Caterpillar Consolidat.pdfWith the following companies Apple Caterpillar Consolidat.pdf
With the following companies Apple Caterpillar Consolidat.pdf
 
Would the current answer be considered correct 2 Identify .pdf
Would the current answer be considered correct 2 Identify .pdfWould the current answer be considered correct 2 Identify .pdf
Would the current answer be considered correct 2 Identify .pdf
 
WQ3 Considering that you know about natural selection is o.pdf
WQ3 Considering that you know about natural selection is o.pdfWQ3 Considering that you know about natural selection is o.pdf
WQ3 Considering that you know about natural selection is o.pdf
 
would be earned How much of the total is simple interest an.pdf
would be earned How much of the total is simple interest an.pdfwould be earned How much of the total is simple interest an.pdf
would be earned How much of the total is simple interest an.pdf
 
write 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdf
write 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdfwrite 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdf
write 350400 WORDS AND EXPLAIN BRIEFLY lapter 7 How Touris.pdf
 
World vegetation maps and world climate maps are very simila.pdf
World vegetation maps and world climate maps are very simila.pdfWorld vegetation maps and world climate maps are very simila.pdf
World vegetation maps and world climate maps are very simila.pdf
 
Working with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdfWorking with Dictionaries and ListsSets Modules you can use.pdf
Working with Dictionaries and ListsSets Modules you can use.pdf
 
Working individually or in pairs you will apply what you ha.pdf
Working individually or in pairs you will apply what you ha.pdfWorking individually or in pairs you will apply what you ha.pdf
Working individually or in pairs you will apply what you ha.pdf
 
Without using a function write the JavaScript code so that w.pdf
Without using a function write the JavaScript code so that w.pdfWithout using a function write the JavaScript code so that w.pdf
Without using a function write the JavaScript code so that w.pdf
 
with thefour approches to Internation human resource managem.pdf
with thefour approches to Internation human resource managem.pdfwith thefour approches to Internation human resource managem.pdf
with thefour approches to Internation human resource managem.pdf
 
Why did the marine trophic index continue to decline after t.pdf
Why did the marine trophic index continue to decline after t.pdfWhy did the marine trophic index continue to decline after t.pdf
Why did the marine trophic index continue to decline after t.pdf
 
With regard to the Pacific the phrase tyranny of distance.pdf
With regard to the Pacific the phrase tyranny of distance.pdfWith regard to the Pacific the phrase tyranny of distance.pdf
With regard to the Pacific the phrase tyranny of distance.pdf
 
With or without Dox the amount of virus stays the same Does.pdf
With or without Dox the amount of virus stays the same Does.pdfWith or without Dox the amount of virus stays the same Does.pdf
With or without Dox the amount of virus stays the same Does.pdf
 
Wildhorse Co had the following assets on January 12025 Du.pdf
Wildhorse Co had the following assets on January 12025 Du.pdfWildhorse Co had the following assets on January 12025 Du.pdf
Wildhorse Co had the following assets on January 12025 Du.pdf
 
With respect to the shoulder latissimus dorsi is a twojoin.pdf
With respect to the shoulder latissimus dorsi is a twojoin.pdfWith respect to the shoulder latissimus dorsi is a twojoin.pdf
With respect to the shoulder latissimus dorsi is a twojoin.pdf
 
Why should organizations be interested in ISO 20400 What ar.pdf
Why should organizations be interested in ISO 20400 What ar.pdfWhy should organizations be interested in ISO 20400 What ar.pdf
Why should organizations be interested in ISO 20400 What ar.pdf
 

Recently uploaded

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Recently uploaded (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

Write a complete C++ program including comments to compute.pdf

  • 1. Write a complete C++ program (including comments) to compute the contents of a cash register at the end of the day. At the start of the day, your program should ask the user for: Total starting amount of cash in the register. Your program should then loop for 5 customers. For each customer (each iteration in the loop): Ask the total value of the bill. How much does the user owe? Check if the user is paying with cash or debit card If the user is paying with cash, add the cash paid to the register cash. If the user is paying with a debit card, ask if the user wants cash back. If yes, ask for the amount of cash back and subtract this amount from the register.