SlideShare a Scribd company logo
Part 2: Tip Calculator Problem Statement: You're out to eat with friends and want to split the
bill, but you're not sure how much to tip. Write a C++ program that calculates the tip amount
based on the total bill and the number of people splitting the bill. The program should prompt the
user to input the following information: 1. The total bill amount 2. The number of people
splitting the bill 3. Tip percentage The program should then calculate the recommended tip and
the total amount owed by each person. The program should output the following information: 1.
The total bill amount 2. Tip amount 3. Total amount owed by each person At the end of each
calculation, the user should be asked if they want to do another calculation or exit the program.
The program must handle all types of bad inputs from user and recover from the errors. Example
run: (User inputs are highlighted!) Enter the total bill amount: 4 fdd 555 Invalid input! Bill
amount must be a float/double! Enter the total bill amount: 150.88 Enter the number of people
splitting the bill: 5.6 Invalid input! Number of people must be a positive integer! Enter the
number of people splitting the bill: 0 Invalid input! Number of people must be a positive integer!
Enter the number of people splitting the bill: 8 Enter the tip percentage, between 1 to 100 (i.e.,
for 15% , enter 15 ): 15 Total bill amount: $150.88 Tip amount: $22.63 ( 15% ) Total amount
owed by each person: $21.69 Do you want to do another calculation? (0-no, 1-yes): 0 Required
function(s): Your program must involve the following functions. You may not change the
parameters or the return type!!! //a function to get bill amount from the user double get_bill();
OR void get_bill (double& bill_amount); //a function to calculate the tip amount double
calculate_tip (double bill_amount, double tip_percentage); OR void calculate_tip (double
bill_amount, double tip_percentage, double& tip);

More Related Content

Similar to Part 2- Tip Calculator Problem Statement- You're out to eat with frien.pdf

INT213 Project Report: Income Tax Calculator
INT213 Project Report: Income Tax CalculatorINT213 Project Report: Income Tax Calculator
INT213 Project Report: Income Tax Calculator
Qazi Maaz Arshad
ย 
As with all projects in this course, your programโ€™s output wil.docx
As with all projects in this course, your programโ€™s output wil.docxAs with all projects in this course, your programโ€™s output wil.docx
As with all projects in this course, your programโ€™s output wil.docx
randymartin91030
ย 
Accenture fico interview-questions
Accenture fico interview-questionsAccenture fico interview-questions
Accenture fico interview-questions
prabhakar vanam
ย 
Advanced Computer Programming..pptx
Advanced Computer Programming..pptxAdvanced Computer Programming..pptx
Advanced Computer Programming..pptx
KrishanthaRanaweera1
ย 
Cfa level 1 quantitative analysis e book part 1
Cfa level 1 quantitative analysis e book   part 1Cfa level 1 quantitative analysis e book   part 1
Cfa level 1 quantitative analysis e book part 1
parmanandiskool
ย 
Log in system
Log in systemLog in system
Log in system
QuangMinh146
ย 

Similar to Part 2- Tip Calculator Problem Statement- You're out to eat with frien.pdf (6)

INT213 Project Report: Income Tax Calculator
INT213 Project Report: Income Tax CalculatorINT213 Project Report: Income Tax Calculator
INT213 Project Report: Income Tax Calculator
ย 
As with all projects in this course, your programโ€™s output wil.docx
As with all projects in this course, your programโ€™s output wil.docxAs with all projects in this course, your programโ€™s output wil.docx
As with all projects in this course, your programโ€™s output wil.docx
ย 
Accenture fico interview-questions
Accenture fico interview-questionsAccenture fico interview-questions
Accenture fico interview-questions
ย 
Advanced Computer Programming..pptx
Advanced Computer Programming..pptxAdvanced Computer Programming..pptx
Advanced Computer Programming..pptx
ย 
Cfa level 1 quantitative analysis e book part 1
Cfa level 1 quantitative analysis e book   part 1Cfa level 1 quantitative analysis e book   part 1
Cfa level 1 quantitative analysis e book part 1
ย 
Log in system
Log in systemLog in system
Log in system
ย 

More from arcellzone

package ex2- public class Exercise2-E- { private static class N.pdf
package ex2- public class Exercise2-E- {        private static class N.pdfpackage ex2- public class Exercise2-E- {        private static class N.pdf
package ex2- public class Exercise2-E- { private static class N.pdf
arcellzone
ย 
Part A List five 21st Century Skills you need to develop- Part B Ass.pdf
Part A List five 21st Century Skills you need to develop-   Part B Ass.pdfPart A List five 21st Century Skills you need to develop-   Part B Ass.pdf
Part A List five 21st Century Skills you need to develop- Part B Ass.pdf
arcellzone
ย 
Part 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdf
Part 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdfPart 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdf
Part 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdf
arcellzone
ย 
Part 8- Use the simplified sum-of-minterms expressions to generate the (1).pdf
Part 8- Use the simplified sum-of-minterms expressions to generate the (1).pdfPart 8- Use the simplified sum-of-minterms expressions to generate the (1).pdf
Part 8- Use the simplified sum-of-minterms expressions to generate the (1).pdf
arcellzone
ย 
Part 2- Character -- Reminder- all data objects should have getters an.pdf
Part 2- Character -- Reminder- all data objects should have getters an.pdfPart 2- Character -- Reminder- all data objects should have getters an.pdf
Part 2- Character -- Reminder- all data objects should have getters an.pdf
arcellzone
ย 
Part 1- Research the Importance of an IT Asset Inventory Conduct an in.pdf
Part 1- Research the Importance of an IT Asset Inventory Conduct an in.pdfPart 1- Research the Importance of an IT Asset Inventory Conduct an in.pdf
Part 1- Research the Importance of an IT Asset Inventory Conduct an in.pdf
arcellzone
ย 
Part 2 Water Trace a molecule of water from the renal artery to the re.pdf
Part 2 Water Trace a molecule of water from the renal artery to the re.pdfPart 2 Water Trace a molecule of water from the renal artery to the re.pdf
Part 2 Water Trace a molecule of water from the renal artery to the re.pdf
arcellzone
ย 
Part 2 1- Create a list of all the IP addresses used to attempt to log.pdf
Part 2 1- Create a list of all the IP addresses used to attempt to log.pdfPart 2 1- Create a list of all the IP addresses used to attempt to log.pdf
Part 2 1- Create a list of all the IP addresses used to attempt to log.pdf
arcellzone
ย 
Part 11 atratighisini and youngist will the in lith- thery are fiponit.pdf
Part 11 atratighisini and youngist will the in lith- thery are fiponit.pdfPart 11 atratighisini and youngist will the in lith- thery are fiponit.pdf
Part 11 atratighisini and youngist will the in lith- thery are fiponit.pdf
arcellzone
ย 
Parsing food data lab - Please answer in JAVA Given a text file contai.pdf
Parsing food data lab - Please answer in JAVA Given a text file contai.pdfParsing food data lab - Please answer in JAVA Given a text file contai.pdf
Parsing food data lab - Please answer in JAVA Given a text file contai.pdf
arcellzone
ย 
Paris Just Got Cheaper for American Tourists Paris- France- Americans.pdf
Paris Just Got Cheaper for American Tourists Paris- France- Americans.pdfParis Just Got Cheaper for American Tourists Paris- France- Americans.pdf
Paris Just Got Cheaper for American Tourists Paris- France- Americans.pdf
arcellzone
ย 
Parent generation Cross-fertilization F1 generation F2 generationRead.pdf
Parent generation Cross-fertilization F1 generation F2 generationRead.pdfParent generation Cross-fertilization F1 generation F2 generationRead.pdf
Parent generation Cross-fertilization F1 generation F2 generationRead.pdf
arcellzone
ย 
Paf is a small country- Its currency is the pif- and the exchange rate.pdf
Paf is a small country- Its currency is the pif- and the exchange rate.pdfPaf is a small country- Its currency is the pif- and the exchange rate.pdf
Paf is a small country- Its currency is the pif- and the exchange rate.pdf
arcellzone
ย 
package linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdfpackage linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdf
arcellzone
ย 
package hw1-public class Runner { public static void main(String-- arg (1).pdf
package hw1-public class Runner { public static void main(String-- arg (1).pdfpackage hw1-public class Runner { public static void main(String-- arg (1).pdf
package hw1-public class Runner { public static void main(String-- arg (1).pdf
arcellzone
ย 
P1) Given the Von Neumann architecture- answer the following questions.pdf
P1) Given the Von Neumann architecture- answer the following questions.pdfP1) Given the Von Neumann architecture- answer the following questions.pdf
P1) Given the Von Neumann architecture- answer the following questions.pdf
arcellzone
ย 
P1) Answer the following questions (a) We discussed about bottleneck i.pdf
P1) Answer the following questions (a) We discussed about bottleneck i.pdfP1) Answer the following questions (a) We discussed about bottleneck i.pdf
P1) Answer the following questions (a) We discussed about bottleneck i.pdf
arcellzone
ย 
P1) Answer the following questions ( 40 points) (a) We discussed about.pdf
P1) Answer the following questions ( 40 points) (a) We discussed about.pdfP1) Answer the following questions ( 40 points) (a) We discussed about.pdf
P1) Answer the following questions ( 40 points) (a) We discussed about.pdf
arcellzone
ย 
Our Space is a social media site that is growing in popularity- The fi.pdf
Our Space is a social media site that is growing in popularity- The fi.pdfOur Space is a social media site that is growing in popularity- The fi.pdf
Our Space is a social media site that is growing in popularity- The fi.pdf
arcellzone
ย 
P(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdf
P(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdfP(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdf
P(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdf
arcellzone
ย 

More from arcellzone (20)

package ex2- public class Exercise2-E- { private static class N.pdf
package ex2- public class Exercise2-E- {        private static class N.pdfpackage ex2- public class Exercise2-E- {        private static class N.pdf
package ex2- public class Exercise2-E- { private static class N.pdf
ย 
Part A List five 21st Century Skills you need to develop- Part B Ass.pdf
Part A List five 21st Century Skills you need to develop-   Part B Ass.pdfPart A List five 21st Century Skills you need to develop-   Part B Ass.pdf
Part A List five 21st Century Skills you need to develop- Part B Ass.pdf
ย 
Part 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdf
Part 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdfPart 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdf
Part 5- Use the 105CLl to Gather Device Information (10 points) Issue.pdf
ย 
Part 8- Use the simplified sum-of-minterms expressions to generate the (1).pdf
Part 8- Use the simplified sum-of-minterms expressions to generate the (1).pdfPart 8- Use the simplified sum-of-minterms expressions to generate the (1).pdf
Part 8- Use the simplified sum-of-minterms expressions to generate the (1).pdf
ย 
Part 2- Character -- Reminder- all data objects should have getters an.pdf
Part 2- Character -- Reminder- all data objects should have getters an.pdfPart 2- Character -- Reminder- all data objects should have getters an.pdf
Part 2- Character -- Reminder- all data objects should have getters an.pdf
ย 
Part 1- Research the Importance of an IT Asset Inventory Conduct an in.pdf
Part 1- Research the Importance of an IT Asset Inventory Conduct an in.pdfPart 1- Research the Importance of an IT Asset Inventory Conduct an in.pdf
Part 1- Research the Importance of an IT Asset Inventory Conduct an in.pdf
ย 
Part 2 Water Trace a molecule of water from the renal artery to the re.pdf
Part 2 Water Trace a molecule of water from the renal artery to the re.pdfPart 2 Water Trace a molecule of water from the renal artery to the re.pdf
Part 2 Water Trace a molecule of water from the renal artery to the re.pdf
ย 
Part 2 1- Create a list of all the IP addresses used to attempt to log.pdf
Part 2 1- Create a list of all the IP addresses used to attempt to log.pdfPart 2 1- Create a list of all the IP addresses used to attempt to log.pdf
Part 2 1- Create a list of all the IP addresses used to attempt to log.pdf
ย 
Part 11 atratighisini and youngist will the in lith- thery are fiponit.pdf
Part 11 atratighisini and youngist will the in lith- thery are fiponit.pdfPart 11 atratighisini and youngist will the in lith- thery are fiponit.pdf
Part 11 atratighisini and youngist will the in lith- thery are fiponit.pdf
ย 
Parsing food data lab - Please answer in JAVA Given a text file contai.pdf
Parsing food data lab - Please answer in JAVA Given a text file contai.pdfParsing food data lab - Please answer in JAVA Given a text file contai.pdf
Parsing food data lab - Please answer in JAVA Given a text file contai.pdf
ย 
Paris Just Got Cheaper for American Tourists Paris- France- Americans.pdf
Paris Just Got Cheaper for American Tourists Paris- France- Americans.pdfParis Just Got Cheaper for American Tourists Paris- France- Americans.pdf
Paris Just Got Cheaper for American Tourists Paris- France- Americans.pdf
ย 
Parent generation Cross-fertilization F1 generation F2 generationRead.pdf
Parent generation Cross-fertilization F1 generation F2 generationRead.pdfParent generation Cross-fertilization F1 generation F2 generationRead.pdf
Parent generation Cross-fertilization F1 generation F2 generationRead.pdf
ย 
Paf is a small country- Its currency is the pif- and the exchange rate.pdf
Paf is a small country- Its currency is the pif- and the exchange rate.pdfPaf is a small country- Its currency is the pif- and the exchange rate.pdf
Paf is a small country- Its currency is the pif- and the exchange rate.pdf
ย 
package linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdfpackage linkedLists- import java-util-Iterator- --- A class representi.pdf
package linkedLists- import java-util-Iterator- --- A class representi.pdf
ย 
package hw1-public class Runner { public static void main(String-- arg (1).pdf
package hw1-public class Runner { public static void main(String-- arg (1).pdfpackage hw1-public class Runner { public static void main(String-- arg (1).pdf
package hw1-public class Runner { public static void main(String-- arg (1).pdf
ย 
P1) Given the Von Neumann architecture- answer the following questions.pdf
P1) Given the Von Neumann architecture- answer the following questions.pdfP1) Given the Von Neumann architecture- answer the following questions.pdf
P1) Given the Von Neumann architecture- answer the following questions.pdf
ย 
P1) Answer the following questions (a) We discussed about bottleneck i.pdf
P1) Answer the following questions (a) We discussed about bottleneck i.pdfP1) Answer the following questions (a) We discussed about bottleneck i.pdf
P1) Answer the following questions (a) We discussed about bottleneck i.pdf
ย 
P1) Answer the following questions ( 40 points) (a) We discussed about.pdf
P1) Answer the following questions ( 40 points) (a) We discussed about.pdfP1) Answer the following questions ( 40 points) (a) We discussed about.pdf
P1) Answer the following questions ( 40 points) (a) We discussed about.pdf
ย 
Our Space is a social media site that is growing in popularity- The fi.pdf
Our Space is a social media site that is growing in popularity- The fi.pdfOur Space is a social media site that is growing in popularity- The fi.pdf
Our Space is a social media site that is growing in popularity- The fi.pdf
ย 
P(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdf
P(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdfP(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdf
P(Zn-kZn1-j)-k!(j)kej (5 points) Let T be the minimal value of n such.pdf
ย 

Recently uploaded

SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
ย 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
ย 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
ย 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
ย 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
ย 
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Nguyen Thanh Tu Collection
ย 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
ย 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Nguyen Thanh Tu Collection
ย 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
ย 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
ย 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
ย 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
ย 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
melliereed
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
ย 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
ย 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
ย 

Recently uploaded (20)

SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
ย 
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
ย 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
ย 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
ย 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
ย 
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
Bร€I TแบฌP Dแบ Y THรŠM TIแบพNG ANH LแปšP 7 Cแบข Nฤ‚M FRIENDS PLUS SรCH CHร‚N TRแปœI SรNG Tแบ O ...
ย 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
ย 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
ย 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
ย 
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
Bร€I TแบฌP Bแป” TRแปข TIแบพNG ANH LแปšP 9 Cแบข Nฤ‚M - GLOBAL SUCCESS - Nฤ‚M HแปŒC 2024-2025 - ...
ย 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
ย 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
ย 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
ย 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
ย 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
ย 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
ย 
Nutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour TrainingNutrition Inc FY 2024, 4 - Hour Training
Nutrition Inc FY 2024, 4 - Hour Training
ย 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
ย 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
ย 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
ย 

Part 2- Tip Calculator Problem Statement- You're out to eat with frien.pdf

  • 1. Part 2: Tip Calculator Problem Statement: You're out to eat with friends and want to split the bill, but you're not sure how much to tip. Write a C++ program that calculates the tip amount based on the total bill and the number of people splitting the bill. The program should prompt the user to input the following information: 1. The total bill amount 2. The number of people splitting the bill 3. Tip percentage The program should then calculate the recommended tip and the total amount owed by each person. The program should output the following information: 1. The total bill amount 2. Tip amount 3. Total amount owed by each person At the end of each calculation, the user should be asked if they want to do another calculation or exit the program. The program must handle all types of bad inputs from user and recover from the errors. Example run: (User inputs are highlighted!) Enter the total bill amount: 4 fdd 555 Invalid input! Bill amount must be a float/double! Enter the total bill amount: 150.88 Enter the number of people splitting the bill: 5.6 Invalid input! Number of people must be a positive integer! Enter the number of people splitting the bill: 0 Invalid input! Number of people must be a positive integer! Enter the number of people splitting the bill: 8 Enter the tip percentage, between 1 to 100 (i.e., for 15% , enter 15 ): 15 Total bill amount: $150.88 Tip amount: $22.63 ( 15% ) Total amount owed by each person: $21.69 Do you want to do another calculation? (0-no, 1-yes): 0 Required function(s): Your program must involve the following functions. You may not change the parameters or the return type!!! //a function to get bill amount from the user double get_bill(); OR void get_bill (double& bill_amount); //a function to calculate the tip amount double calculate_tip (double bill_amount, double tip_percentage); OR void calculate_tip (double bill_amount, double tip_percentage, double& tip);