2. Party shop sells birthday gift bags in two ways. set of 12 bags for $17.99 or an individual bag for $1.75. complete program that asks the user input for the number of gift bags need Customers can purchase a Write a to be purchased (an integer) and outputs the total price of the purchase. a) For example, if the customer buys 14 gift bags, the customer would be charged for 1 set of (12 bags) plus another 2 individual bags. The subtotal would be 1 (17.99) + 2 (1.75) = $21.49. b) Use a constant variable to set a fixed tax rate of 8.875. c) Display correct dollar values (2 decimal places, use cout precision). User input can be any content and it's bold and italicized for clarity. Example Output 1 Welcome to Party Shop! How many gift bags would you like to purchase: 14 SHOPPING CART 1-set (s) $17.99
Q: The annual rate of inflation is the rate at which money loses its value. For example, if the annual…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; int main(){…
Q: Mother is the most loved person. She wants to surprise his son on his birthday so she prepares a…
A: Process: Input for the value which decide the total iteration After that run the value loop…
Q: Complete the following program that finds which of the time points comes last. The time is expressea…
A: correct statements are: time1="12:00"time2="00:55"hh1,mm1 = time1.split(":")hh2,mm2 =…
Q: Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number…
A: C# is a general purpose multi-paradigm programming language developed and used by Microsoft. It…
Q: The interest paid on a savings account is compounded daily. This means that if you start with…
A: logic:- read startBal,Rate,N from user. Define function AccBalance which takes three parameters.…
Q: C++ Coding - Loops Party shop sells birthday gift bags in two ways. Customers can purchase a set…
A: code :-- // for setprecision and standerd input nad output #include<bits/stdc++.h>#include…
Q: Write a program that tells what coins to give out for any amount of change from 1 cent to 99 cents.…
A: Program: //Include necessary header files #include <iostream> using namespace std;…
Q: Q1: Write a program that reads a set of N integers. Then, the program finds and outputs the sum of…
A: Below I have provided a python program for the given question. Also, I have attached a screenshot of…
Q: Java
A: Program: //Import necessary packages import java.util.Scanner; //Define a class named Months public…
Q: > Example: Rewrite the previous code by using nested if condition. grade (x) := if x 2 60 out "you…
A: Here we are taking marks as an input and as a output we get grade of a student if student is less…
Q: Part H: Worker Pay Write a program that asks the user to enter their name, pay rate (in $/hr) and…
A: steps for calculating total amount is if hour > 40: total = 40 * rate + (hour-40) * 1.5 * rate…
Q: Using Do-while Loop in Java Write a program that let the user include his or her three (3) grades.…
A: The following program will ask the user to enter his/her marks/grades of three subjects and…
Q: Simulate the dice game of lucky sevens. The rules are: roll two dice if the sum equals 7, win $4 if…
A: NOTE : As the question is not specific about which Programming Language is to be used to write the…
Q: The first 11 prime integers are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31. positive integer…
A: Note: since the programming language is not specified implementing in C language. code: #include…
Q: Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of…
A: Given: To Write a Java program to test if 2 integer numbers are amicable. For example, 220 and 284…
Q: A weapon shop sells arrow for $3 each. Currently, there is an ongoing buy 7 free 1" promotion, where…
A: #include <iostream>using namespace std; int main(){ int price = 3; int num;…
Q: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be,…
A: C++ Code for the given Question #include<bits/stdc++.h>#include <iostream> using…
Q: //////////// //////////// //////////// how do i solve this problem in java. please do not use…
A: Program Instructions:Use scanner class object to get the user input.Use if-else statements to print…
Q: Customers can purchase a 2. Party shop sells birthday gift bags in two ways. set of 12 bags for…
A: Here is my well commented C++ code: #include <bits/stdc++.h> using namespace std; int main()…
Q: STARBUCKS COFFEE offers a loyalty rewards program for customers with two levels: Green and Gold. It…
A:
Q: Suppose Dave drops a watermelon off a high bridge and lets it fall until it hits the water. If we…
A: Given, d=0.5×g×t2 g=9.8 meters/second2 Program description: t is the user input integer variable…
Q: Q29) Consider you have a list of 20 exam scores. Write a computer program that calculates the…
A: #Code in MATLAB: clear; a=[73, 91, 37, 81, 63, 66, 50, 90, 75, 43, 88, 80, 79, 69, 26, 82, 89, 99,…
Q: 4. A software company sells game cartridges for $99. Quantity discounts are given according to the…
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining…
Q: Question 1 Write a program that asks the user to enter the number of passengers in an airplane and…
A: "Since you have not mention any programming language, so will write our program in C language." C…
Q: In Coral Programing!! Write a program that takes in an integer in the range 20-98 as input. The…
A: Read an integer as input. Check if the integer is between “20” and “98”. If yes, move on to next…
Q: Complete the following program that finds which of the time points comes first. The time is…
A: (1 ) here time2 comes first means hh1 > hh2 because as hh2 is come first it will must be less…
Q: Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of…
A: Amicable Numbers: Amicable numbers are two numbers that are equal to the sum of their respective…
Q: A game is being played between a user and the computer. User selects a number and computer generates…
A: #Solution:-- To write the code for guessing a number game. The code is written in C# as per…
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: Here, first you need to declare some variables for all salaries. Then prompt user to enter basic…
Q: Q: Write a program that will show the following output of the string "Rroduct. Name: HP Laptop…
A: The given program is a simple case of displaying given output. Print statements can be used to…
Q: Q5/ 1. 1. Write a program to read three marks and calculate the average. If the student's average is…
A: Since no programming language is mentioned, I am using python. As per our guidelines, we are…
Q: (b) A triangle can be classified based on the lengths of its sides as equilateral. isosceles or…
A: Algorithm for the code: Step 1: Declare three sides of the triangle. Step 2: Enter three sides at…
Q: Two positive integers are called amicable if the sum of divisors of the first is equal to the sum of…
A: Hello Student. Warm welcome from my side. Hope you are doing absolutely amazing. As you have not…
Q: When you borrow money to buy a house, a car, or for some other purposes, then you typically repay it…
A: Actually, program is a executable software that runs on a computer.
Q: 7- Write a program to input number of 3 digits and check whether it is Armstrong Number or Not.…
A: Write a program to input number of 3 digits and check whether it is Armstrong or not. * Your not…
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: C++ program is given below
Q: 1. A 10% discount is applied to purchases over $10.00. Write a program that asks for amount…
A: The program is created as follows: Declare variables for purchase amount, discount and discounted…
Q: Write a program to check whether the message received at the destination is error-free. For…
A: Algorithm 1. Declare variable length1 and length2 to record length of both the sequence 2. Start…
Q: Q5: Ask the user to enter five capital letters (A..Z), and check if the letters are in an ascending…
A: According to the provided information: We need to create a program that will take five capital…
Q: Write a simple payroll program that will display the employee's information, The program should…
A: Question given: Write a Java program that display employee's payroll information. Ask from user…
Q: Two
A: import java.util.Scanner; public class Main{ public static void main (String args[]) { int…
Q: rite a program that reads the subtotal and the gratuity rate, then computes the gratuity and total.…
A: Approach:- first read subtotal and GratuityRate Calculating Gratuity :- Gratuity = (subtotal *…
Q: Write a program that computes how much a customer has to pay after purchasing two items. Make the…
A: Step 1 : Start Step 2 : Take user input for the price of Item 1 and item 2. Step 3 : Calculate the…
Q: 1- Write a program in which the user is asked to enter his age based on the year (assuming the…
A: Take input from user. check if the number is positive integer or no. and if the number is positive…
Q: In this exercise, we will either have a circle inside a polygon for which we will calculate the…
A: Your C++ program is given below as you required with an output.
Q: In an eye-glass shop, a customer can buy either a pair Ol Sngle prescription sunglasses. On each…
A: Since no programming language was mentioned in the question, I have solved in C language.
Q: C# Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the…
A: Algorithm: Start Read enter the number of days for a resort stay n If n==1 or n==2,calculate cost…
Q: A contractor orders, say, 30 cubic yards of premixed concrete to construct a patio that is to be,…
A: Given The answer is given below.
Q: 6) Write a program that prompts the user to input a number. The program should then output the…
A: According to the asked question, the solution is given below with a proper explanation.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)The monthly payment for a givenloan pays the principal and the interest. The monthly interest is computed by multiplyingthe monthly interest rate and the balance (the remaining principal). The principalpaid for the month is therefore the monthly payment minus the monthly interest.Write a program that lets the user enter the loan amount, number of years, and interestrate then displays the amortization schedule for the loan. Here is a sample run: Loan Amount: 10000 ↵EnterNumber of Years: 1 ↵EnterAnnual Interest Rate: 7 ↵EnterMonthly Payment: 865.26Total Payment: 10383.21Payment# Interest Principal Balance1 58.33 806.93 9193.072 53.62 811.64 8381.43...11 10.00 855.26 860.2712 5.01 860.25 0.01Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönder
- A company of 20 employees wants to find the employee who made the highest commission so he/she can be paid a 10% bonus of the commission he/she earned for that month. The commission an employee makes is calculated by multiplying the sales amount by the commission rate. The commission rates are shown below: Sales Amount Commission Less Than 40000 No commission 40000 to 80000 inclusive 5% Greater than 80000 10% Write a program to: Prompt the user for each employee’s id (an integer value) and the sales amount For each employee, display the commission earned Display the total commission earned by all the employees Display the average commission earned by an employee Display the employee id, the commission and the bonus paid to the employee with the highest commission Must be written in c++, no arrays to be used, only use iostream librarySimulate the dice game of lucky sevens. The rules are: roll two dice if the sum equals 7, win $4 if the sum is not 7, lose $1 Write a program that asks the user how much they would like start the game with. The program should then: simulate the dice roll (using the random function) and show what was rolled show what the user’s funds are after each roll ask the user if they want to roll again if the user wants to roll again, repeat the three actions above if the user does not want to roll again give some response and end the game the final output should show if they won or lost money, and how many rolls they playedusing C language A parking garage charges a $2.00 minimum fee to park for up to three hours andan additional $0.50 per hour for each hour or part thereof over three hours. Themaximum charge for any given 24-hour period is $10.00. Assume that no car parksfor longer than 24 hours at a time. Write a program that will calculate and print theparking charges for each of three customers who parked their cars in this garageyesterday. You should enter the hours parked for each customer. Your programshould print the results in the below format, and should calculate and print thetotal of yesterday's receipts. The program should use the functioncalculateCharges to determine the charge for each customer.
- plz solve it asap ????????: Write a program for a game that consists of two players. The rule of the game is that player 1 inputs a random number from 1-100. Player 2 will input 5 numbers. If the summation of those numbers is equal to the number OR less than or greater than the number by 3 (+3 or -3), then player 2 wins. Otherwise, player 1 wins. Test Case 1 Input Player 1, enter a number: 50 Player 2, enter a number: 10 Player 2, enter a number: 10 Player 2, enter a number: 20 Player 2, enter a number: 5 Player 2, enter a number: 7 Output Player 2 wins Explanation: The summation of 10,10,20,5 and 7 is 52 which is greater than 50 by 2. According to the rule, player 2 wins. Test Case 2 Input Player 1, enter a number: 50 Player 2, enter a number: 10 Player 2, enter a number: 10 Player 2, enter a number: 20 Player 2, enter a number: 5 Player 2, enter a number: 1 Output Player 1 wins Explanation: The summation of 10,10,20,5 and 1 is 46 which is less than 50 and also doesn’t…A parking garage charges a $2.00 minimum fee to park for up to three hours andan additional $0.50 per hour for each hour or part thereof over three hours. Themaximum charge for any given 24-hour period is $10.00. Assume that no car parksfor longer than 24 hours at a time. Write a program that will calculate and print theparking charges for each of three customers who parked their cars in this garageyesterday. You should enter the hours parked for each customer. Your programshould print the results in the below format, and should calculate and print thetotal of yesterday's receipts. The program should use the functioncalculateCharges to determine the charge for each customer.In python, a) In the Hi-Lo game, the player begins with a score of 1000. The player is prompted for the number of points to risk and a second prompt asks the player to choose either High or Low. The player’s choice of either High or Low is compared to a random number between 1 and 13, inclusive. If the number is between 1 and 6 inclusive, then it is considered “low”. A number between 8 and 13 inclusive is “high”. The number 7 is neither high nor low, and the player loses the points at risk. If the player had guessed correctly, the points at risk are doubled and added to the total points. For a wrong choice, the player loses the points at risk. Create a HiLo application based on this specification. Application output should look similar to b) Modify the application to allow the player to continue until there are 0 points left. At the end of the game, display the number of guesses the user took before running out of points.
- Write a program that computes how much a customer has to pay after purchasing two items. Make the lower-priced item half price. If the two items have identical prices, you can make one or the other half price. The price is calculated according to the following rules:• Buy one get one half off promotion: the lower price item is half price.• If the customer is club card member, additional 10% off.• Tax is added. Inputs to the program include:• Two items’ prices• Have club card or not (User enters ‘Y’ or ‘y’ for “yes”; ‘N’ or ‘n’ for “no”)• Tax rate (User enters the percentage as a number; for example, they enter8.25 if the tax rate is 8.25%) Program displays:• Base price - the price before the discounts and taxes• Price after discounts - the price after the buy one get one half off promotionand the member’s discount, if applicable• Total price – the amount of money the customer has to pay (after tax)printed with the precision of 2 decimal digits. Hint: In order to print a number in a…A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one liter of milk is $0.38, and the profit of each carton of milk is $0.27. Write a program that does the following: •Prompts the user to enter the total amount of milk produced in the morning. •Outputs the number of milk cartons needed to hold milk (Round your answer to the nearest integer). •Outputs the cost of producing milk. •Output the profit for producing milkWrite a program that helps a company manage salaries of its employees. Your program should ask for the number of hours worked and the hourly rate of an employee than, display the salary. This program still asks the user to enter the information of many employees until enters a zero value. Sample Run: Enter the number of hours worked (negative nbr to end): 32 Enter hourly rate of the worker: 100 Your salary is $3200 Enter the number of hours worked (negative nbr to end): 40 Enter hourly rate of the worker: 5 Your salary is $200 Enter the number of hours worked (negative nbr to end): 42 Enter hourly rate of the worker: 10 Your salary is 5420 Enter the number of hours worked (negative nbr to end): 0