Concept explainers
The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as follows: If the number of rooms booked at least 10, the discount is 10%; at least 20, the discount is 20%; and at least 30, the discount is 30%. Also if rooms are booked for at least three days, then there is an additional 5% discount. Write a
Trending nowThis is a popular solution!
Chapter 4 Solutions
C++ Programming: From Problem Analysis to Program Design
- bob employs a painting company that wants to use your services to help create an invoice generating system. the painters submit an invoice weekly. they charges $30 per hour worked. they also charge tax -15%. bob likes to see an invoice that display all the information- number of hours, the charge per hours, the total Before tax and total After tax. since this is an invoice, we also need to display the name of the company (painting Xperts) at the top of the invoice. display all of the information on the screen. Using Pseudocode, develop an algorithm for this problem.arrow_forwardA serendipity bookseller has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows: If a customer purchases 0 books, he or she earns 0 points. If a customer purchases 1 books, he or she earns 5 points. If a customer purchases 2 books, he or she earns 15 points. If a customer purchases 3 books, he or she earns 30 points. If a customer purchases 4 or more books, he or she earns 60 points. W rite a program that asks the user to enter the number of books that he or she has purchased this month and then displays the number of points awarded. using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms; namespace Chapter_4_Problem_6___Seth{public partial class bookClubPoints : Form{public bookClubPoints(){InitializeComponent();}}} C# please code with this contextarrow_forwardIf ~A = (A & B) is true, then which of the following gives the truth values of A and B? 1 A and B are both true. (2 A and B are both false. (3 A is true and B is false. 4 A is false and B is true.arrow_forward
- Correct answer will be appreciated.else downvoted.arrow_forwardIn the following procedure, the parameter age represents a person's age. The procedure is intended to return the name of the age group associated with age. People who are under 18 are considered minors, people who are 65 and older are considered senior citizens, and all other people are considered adults. The procedure does not work as intended. Line 1: PROCEDURE ageGroup(age) Line 2: } result "adult" Line 3: Line 4: IF(age 65) Line 5: { Line 6: result "senior citizen" Line 7: Line 8: RETURN(result) Line 9: Line 10: result "adult" Line 11: IF(age < 18) Line 12: Line 13: result "minor" Line 14: Line 15: RETURN(result) Line 16: } ill cause the procedure to work as intended?arrow_forwardA company decided to give bonus of 15% to employee if they work more than or equal to 5 years. Ask user for their salary and year of service and print the net bonus amount together with their previous salary. The user need to enter following details: • their current salary ● their year of service The user will see the following details: • Their previous salary • Their new salary with bonus If the user works less than 5 years, they are going to see "No bonus for you" in their screen together with their regular salary.arrow_forward
- Only correct answer will be upvoted. Else downvoted.arrow_forwardDraw correct else downvote.arrow_forwardCalculate income tax for the given income by following the below rules: Total Income Rate (in %) First 10,000 AZN 0 Next 10,000 AZN 10 The remaining 20 Expected Output: 4 For example, suppose the total income of the user is 45000 AZN. In this case income tax payable is: 10000*0% + 10000*10% + 25000*20% = 6000 AZN. Do not forget to use comment tag in order to explain each line.arrow_forward
- Part 1 of 4 Compute the least-squares regression line for predicting the diastolic pressure from the systolic pressure. Round the sope and y-intercept to at least four decimal places. Regression line equation: y =arrow_forwardIntegers numMelons and dollars are read from input. A melon costs 5 dollars. If numMelons is greater than or equal to 6, then multiply numMelons by 5. If the product of numMelons and 5 is less than or equal to dollars, output "Approved transaction.". Otherwise, output "Not all melons purchased.". If numMelons is greater than 35, output "Now out of stock.". Otherwise, output "Item still in stock.". End with a newline. Ex: If the input is 11 65, then the output is: Approved transaction. Item still in stock. NOTE: Produce the following in Java language!arrow_forwardPlease read the question first and than only answer if you can. I will flag your answer if you will provide a wrong code.arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning