Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java please Safari File Edit View History Bookmarks Window Help edes acts are Ansigt Sun 7:21 PM Die Tech Aw H 1200 Assignment3c: Party of

java please image text in transcribed
image text in transcribed
Safari File Edit View History Bookmarks Window Help edes acts are Ansigt Sun 7:21 PM Die Tech Aw H 1200 Assignment3c: Party of 6? Have you noticed that if you're dining in a restaurant with a group of 6 or more people, that an extra 18% gratuity will be added to the bill? This is to ensure that your party doesn't leave without leaving a tip Write a program that asks the user to input the number of people in their group and the cost of the bill. If the group has 6 or more people, the program will add 18% gratuity to the bill and ask the user if they want to leave an additional tip. If the user answers yes, the program will prompt the user to enter an additional tip and the program will print the total bill. If the user answers no then the program just prints the total bill. If the group has less than 6 people, the program will ask for a tip, then calculates the total bill. You need to use the float data type for your variables. Sample Output #1: How many people in your party? 6 What is the total cost of your bill? 200 Your bill is $236 Would you like to include an additional tip (Y/N)? Y How much? 25 Total bill is: $261 Sample Output 12: How many people in your party? 4 What is the total cost of your bill? 300 Your bill is $300 the program will print the total bill. If the user answers no, then the program just prints the total bill. If the group has less than 6 people, the program will ask for a tip, then calculates the total bill. You need to use the float data type for your variables, Sample Output #1: How many people in your party? 6 What is the total cost of your bill? 200 Your bill is $236 Would you like to include an additional tip (Y/N)? Y How much? 25 Total bill is: $261 Sample Output #2: How many people in your party? 4 What is the total cost of your bill? 300 Your bill is $300 How much for the tip? 25 Total bill is: $325

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Determine the amplitude and period of each function.

Answered: 1 week ago