A Hotel Resérvation Program Write a program that allows the user to reserve a room in a hotel and display the price of this reservation. The program will ask the user to choose a type of room, either single or double (S,D). Then the user will enter the number of nights. The price of each night according to the type: Туре price 200 $ 300$ The reservation cost = number of nights * room price. If the user enters a letter different from (S or D) for the type, then the program must display "invalid room description". If the user entered number of nights that less than or equal to 0, then the program must display "invalid number". Below are some sample runs:
Q: 4. Area of a Rectangle • Write a program that compares the area of two rectangles. You can do this…
A: len_rect1 = float(input("Enter the length of first rectangle: ")) # taking the length of rect1…
Q: A mobile phone service provider has three different subscription packages for its customers: Package…
A: Code: #include <iostream>using namespace std;int main(){ char choice; int mins, extramins;…
Q: Write a program that can be used to assign seats for a commercial airplane. The airplane has 13…
A: NOTE: - Below code is implemented in c++. PROGRAM EXPLANATION: - The airplane has 13 rows with 6…
Q: Question: Party budget planning - complex Prompt the user to enter their current budget and the…
A: You are ordering food from a restaurant that has two menu items: Tacos $4 Empanadas $3
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: import java.util.*; public class ThreeLetterAcronym{ public static void main(String []args){…
Q: LIFE INSURANCE PREMIUM CALCULATOR Write a C program that calculates monthly, quarterly, half-yearly…
A: Please find the answer below :
Q: A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each…
A: The complete code in python programming language is below:
Q: Scissor, rock, paper Write a program called GameSRP.java that plays the popular scissor-rock-paper…
A: We have to write a JAVA code foe Scissor, Rock and Paper with our computer. It will be continuous…
Q: A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each…
A: Given: To write a program that uses these rules to calculate and display a contestant’s score. A…
Q: Enter the number of days: Day Cents $ 0.01 2 $ 0.02 3 $ 0.04 4 $ 0.08 $ 0.16 $ 0.32 $ 0.64 $ 1.28 $…
A: Find Your Code Below
Q: (Financial application: calculate tips) Write a program that reads the subtotal and the gratuity…
A: //Whenever if you asked programming related questions you should always have to specify in which…
Q: Department Program Maps Student Services Academics Career Department 444 01 Week-7 Test-2 (10%…
A: Explanation of the code is given by the comments in the code itself. NOTE: The file name should be…
Q: Grade Point Average- GPA calculator: Write a program that asks the user to enter his letter grade in…
A: //Program to calculate GPA
Q: Widgets and Gizmos An online retailer sells two products: widgets and gizmos. Each widget weighs 75…
A: code is given below:
Q: Magic Number Programming: Magic program ask user to enter three integers by the user, the three…
A: # include<stdio.h> void magic(int left, int right, int digit) // the function to generate…
Q: Homework – Topic 6 – Calculator: Write a program which allows the user to perform simple tasks on a…
A: #include<stdio.h> #include<stdlib.h>void menu( );void add( );void sub( );void mul(…
Q: A code in c++ or python A program that asks you to enter the name of a movie or series, and then…
A: #using python#asking user to enter movie or series namename = input('Enter name of a…
Q: Please Write java application not python please? You giving us wrong answers we dont need python we…
A: import java.util.*; public class Limpopo{ public static void main(String args[]) {…
Q: Question: Party budget planning - complex Prompt the user to enter their current budget and the…
A: Calculate and print out all the options of meals where the budget is used entirely(where possible)…
Q: Nice Number Programming: Nice program ask user to enter three integers from keyboard (java console),…
A: Below is the required java program. Program Approach: Import necessary packages to get the standard…
Q: The Fibonacci series is a series that begins with 0 and 1 and has the property that each succeeding…
A: PROGRAM CODE: #include <iostream> // include header file for input output stream…
Q: Function Name: dominosTime() Parameters: N/A Returns: None Description: During the summer, you…
A: Python used to answer this question
Q: Magie Number Programming: Magic program ask user to enter three integers by the user, the three…
A: Given: Magic program ask user to enter three integers by the user, the three integers represent left…
Q: A flight company computes the ticket price of a travel depending on the reservation rate and the…
A: The requested Java program code has been provided in the next step using if-else statements.
Q: PYTHON programming solotion Develop a program that allows the user to enter a start value of 1 to…
A: I have provided PYTHON CODE along with CODE SCREENSHOT and OUTPUT…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: import randomdef game(): exit = True while(exit==True): #User enters his/her choice of…
Q: Activities at Lake LazyDays As activity directory at Lake LazyDays Resort, it is your job to suggest…
A: ANSWER:-
Q: Magic Number Programming: Magic program ask user to enter three integers by the user, the three…
A: # include<stdio.h> void magic_numbers(int left, int right, int digit) // the function to…
Q: Questions - (Has 2 Parts). Based on each code, which answer out of the choices "A,B,C,D,E" is…
A: Refer to step 2 for the answer.
Q: The language is C# Write a program named TestScoreList that accepts eight int values representing…
A: Program: using System;//using static System.Console; class TestScoreList{static void Main(){int…
Q: An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance…
A: Program Explanation – Import the essential java libraries. Declare the class named as Main.…
Q: Java Programming A dentist requests you to develop the Dental Payment application. This application…
A: Answer: I have done code and also I have attached code and code screenshot as well as output
Q: ISSUE NEEDED TO BE SOLVED: I attached the error codes that keep presenting themselves with the code…
A: Below is the explanation:
Q: Code 2: Write a program that will prompt a user to enter a systolic blood pressure (SBP) and…
A: Below is the required program in C language. Program Approach: Including header files for the…
Q: Jane has opened a new fitness center with charges of 2500 per month so the cost to become a member…
A: Note : I have added the output screenshot. Also with total money made, the code prints members and…
Q: Write method IsEven that uses the remainder operator (%) to determine whether an integer is even.…
A: Program : import java.util.Scanner; public class Main { public static boolean isEven(int z){…
Q: Different types for operators > equal →greater or equal > less or equal → not equal → greater → less…
A: The question on writing kotlin program to check the given condition.
Q: 24. Word Game Write a program that plays a word game with the user. The program should ask the user…
A: sample output
Q: Microwaves / Radio Waves If a scientist knows the wavelength of an electromagnetic wave she can…
A: Source Code: #include<iostream>using namespace std; int main(){ cout<<"Enter…
Q: A Hotel Reservation Program Write a program that allows the user to reserve a room in a hotel and…
A: Source Code: import java.io.*;import java.util.Scanner; public class Reservation{ public static…
Q: circles) Write a program that prompts the user to enter the center coordinates and radii of two…
A: Here is the Java program according to the problem given: import java.util.Scanner; public class…
Q: ++ program int quadrant() This method will return at which quadrant does this point lie in our…
A: Required: C++ program int quadrant() This method will return at which quadrant does this point lie…
Q: Question 7
A: Following is the C++ program and its approach is given below: Declare necessary header files.…
Q: Three-letter acronyms are common in the business world. For example, in Java you use the IDE…
A: Approach Built-in methods used: toUpperCase() length() charAt()
Q: (Financial application: calculate future investment value) Write a program that reads in an…
A: Convert the interest rate from annual interest rate to monthly interest rate
Q: (Algebra: solve quadratic equations) The two roots of a quadratic equation ax + bx + c = 0 can be…
A: read a , b and c from user. pass value of a,b and c to function RootFind. check if a==0 display…
Q: // A standard mortgage is paid monthly over 30 years. // This program is intended to display 360…
A: Answer: for(int i=0; i<30;i++)//this loop is for the year for(int i=0;j<12;j++) printf("the…
Q: Assignment: Carefully read the instructions and write a program that reads the following information…
A: The following program is compiled in replit and also Eclipse.Pseudo code:Get the inputs from the…
Q: Trivia Game In this programming exercise, you will create a simple trivia game for two players. The…
A: Question.py • Define the class named “Question”. ○ Define “__init__()” method for “Question”…
write the
Step by step
Solved in 3 steps with 3 images
- Retail price calculator Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It should then display the item’s retail price. For example: • If an item’s wholesale cost is 5.00 and its markup percentage is 100 percent, then the item’s retail price is 10.00.• If an item’s wholesale cost is 5.00 and its markup percentage is 50 percent, then the item’s retail price is 7.50. The program should have a method named calculateRetail that receives the wholesale cost and the markup percentage as arguments and returns the retail price of the item.Exercise I- Medicine Write a program that asks the user to enter the name of the medicine (t for ThroX, f for FeliX), his mass. The user should enter as well if he has a prescription or not. The program will calculate the dosage using: age and his ThroX without prescription -The max dosage should be 0.75 mL -The dosage = mass / 150 -The number of pills per day to take is 1 ThroX with prescription -The dosage =mass * 3 / 150 -The number of pills per day to take is 5 FeliX with prescription -The dosage = 0.77 mL FeliX without prescription -The dosage should be between 0.3 and 0.7 -The dosage = mass * 0.009 -The number of pills per day to take is 2 -The number of pills per day to take is 6 The program should display the dosage and the number of pills to be taken per day if the requirements are full filled, otherwise it display "Please check your doctor for a prescription". In case the medicine does not exist in the database, the program display “Your medicine is not in our database!"…Please answer in C# Write a program named TemperaturesComparison that allows a user to input five daily Fahrenheit temperatures that must range from −30 to 130. If a temperature is out of range, require the user to reenter it. If no temperature is lower than any previous one, display a message Getting warmer. If every temperature is lower than the previous one, display a message Getting cooler. If the temperatures are not entered in either ascending or descending order, display a message It’s a mixed bag. Finally, display the temperatures in the order they were entered, and then display the average of the temperatures. Your program's output should look like the following: Getting warmer: 70 74 77 78 81 Average: 76
- Software SalesA software company sells a package that retails for $99. Quantity discounts are given accordingto the following table:Quantity Discount10–19 10%20–49 20%50–99 30%100 or more 40%Write a program that asks the user to enter the number of packages purchased. The programshould then display he number of packages purchased, the amount of the discount (if any) and the total amount of the purchase after the discount.A Charge Account Statement Write a program to prepare the monthly charge account statement for a customer of CS CARD International, a credit card company. The program should take as input the previous balance on the account and the total amount of additional charges during the month. The program should then compute the interest for the month, the total new balance (the previous balance plus additional charges plus interest), and the minimum payment due. Assume the interest is 0 if the previous balance was 0 but if the previous balance was greater than 0 the interest is 2% of the total owed (previous balance plus additional charges). Assume the minimum payment is as follows: new balance for a new balance less than $50 $50.00 for a new balance between $50 and $300 (inclusive) 20% of the new balance for a new balance over $300 So if the new balance is $38.00 then the person must pay the whole $38.00; if the balance is $128 then the person must pay $50; if the balance is $350 the minimum…XYZ Company, LLC uses a program to manage the information of their employees. The program gets the name of the employee, number of hours worked and rate per hour. It computes the salary by multiplying the number of hours worked with rate per hour. If the salary is more than 1000, tax is computed as 5% of the salary, otherwise, tax is computed as 2% of the salary. The program will display the name of the employee, salary and tax.
- Time CalculatorWrite a program that asks the user to enter a number of seconds.-There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes and leftover seconds in that many seconds.-There are 3,600 seconds in an hour. If the number of seconds entered by the user is greater than or equal to 3,600, the program should display the number of hours, minutes, and leftover seconds in that many seconds.-There are 86,400 seconds in a day. If the number of seconds entered by the user is greater than or equal to 86,400, the program should display the number of days, hours, minutes, and leftover seconds in that many seconds.Remaining Time: 54 minutes, 49 seconds. * Question Completion Status: QUESTION 19 Write a Java program that prompts the user to enter the School Grade Level of a student and then calculate their discount amount in the regular fees structure offered during this pandemic situation. By using the below table, calculate their discount amount from the amount of the regular fee and then print the discount amount in OMR by using the appropriate selection structure. (Assume the user is entering a maximum Grade level is 12) discount amount = Regular Fees * percentage of discount rate School Grade Level Regular Fees in OMR Discount Rate >9 and 6 and 3 and 0 and <=3 30.500 5% otherwise 20.400 No discount T T T Arial 3 (12pt) v T -E E- 只i ン Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers TOSHIBA F5 F6 F7 F8 F9 F10 F11 F12 INS SCNULL LOCK AD & 67 7 V 8A9 4 0Party-On sells individual hot/cold cups and dessert plates for parties. SueChen wants a program that allows her to enter the price of a cup, the price of a plate, the number of cups purchased, and the number of plates purchased. The program should then calculate the total cost of the purchase, including the sales tax. Finally, the program should display the total cost on the screen. Desk-check your solution’s algorithm using $0.50 as the cup price, $1 as the plate price, 35 as the number of cups, 35 as the number of plates, and 2% as the tax rate. Then desk-check it using $0.25, $0.75, 20, 10, and 6%.
- Box Office: A movie theater only keeps a percentage (20%) of the revenue earned from ticket sales. The remainder goes to the movie distributor. Write a program that calculates a theater’s gross and net box office profit for a night. The program should ask for the name of the movie, and how many adult and child tickets were sold. (The price of an adult ticket is $10.00 and a child’s ticket is $6.00.) Input: the name of the movie, number of adult tickets sold, number of child tickets sold Output: as specified below Object: cin, cout, getline, format output Note: 1. Movie names contain spaces 2, the report is aligned. 3. The decimal number is displayed with 2 decimal places.Remaining Time: 1 hour, 14 minutes, 07 seconds. Question Completion Status: QUESTION 11 Write a Java program that prompts the user to enter the monthly salary amount of an employee in OMR and then deduct a 29% amount as a provident fund from the monthly salary. Calculate, a. Monthly deduction amount = Monthly Salary Amount * percentage of deduction b. Monthly Net salary amount = Monthly Salary Amount – Monthly Deduction amount c. Calculate and display the Annual Net salary amount in OMR and Annual deduction amount in OMR. T T T Arial v 3 (12pt) 回i ン Save All A TOSHIBA 10A mail-order house sells five products whose retail prices are as follows: Product 1, $2.98; product 2, $4.50; prod- uct 3, $9.98; product 4, $4.49 and product 5, $6.87. Write an application that reads a series of pairs of numbers as follows: a) product number b) quantity sold Your program should use a switch statement to determine the retail price for each product. It should calculate and display the total retail value of all products sold. Use a sentinel-controlled loop to determine when the pro- gram should stop looping and display the final results.