Write a program that prints a grocery receipt of items purchased.
Q: Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: "Since you have not mention any programming language, so we will write this program in C++…
Q: Write a program that assigns the following values:
A: Program understanding In java, assigning the values to a variable of a particular type is performed…
Q: Write a program that calculates the change due a customer by denomination; that is, how many…
A: Answer is given below .
Q: Write a program that reads the following information and prints a payroll statement: Employee’s name…
A: 1. Input All values 2. Calculate gross=hour_pay_rate*10 deduction=gross*0.20 state=gross*0.09…
Q: Write a program that lets the user guess whether the flip of a coin results in heads or tails. The…
A: Answer : #include<iostream>#include<ctime>#include<cstdlib>using namespace std;int…
Q: Write a program that asks the user for the number of adult and the number of child movie tickets…
A: Answer :- #include <iostream> #include <iomanip> using namespace std; int main() {…
Q: Write a program that calculates and prints the amount of wages due to an employee for a week's work.…
A: C++ program to calculate the amount of wages due to an employee for a week’s work. Prompt the user…
Q: Write a program to simulate a bank transaction. As the banker, create a single pin number for all…
A: Required: Write a program to simulate a bank transaction. As the banker, create a single pin number…
Q: Write a program that lets the user guess whether the flip of a coin results in heads or tails. The…
A: The program has the following algorithm: Declare the necessary variables within the “main()”…
Q: A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5feet of…
A: Program Code: #include <iostream>using namespace std;int main(){int feet, inches, weight; cout…
Q: The power of the microwave can be calculated as follows: Power=Work/Time Work is measured in joules…
A: code: #include<iostream> using namespace std; //main method int main() { //variable…
Q: Write a program that calculates and displays a person’s body mass index (BMI). A person’s BMI is…
A: According to the Question below the Solution: Program Output:
Q: Write a program that reads in an investment amount, the annual interest rate, and the number of…
A: PROGRAM CODE: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that determines a student's grade. The program will read three types of scores…
A: The program is written in C++ Language. Check the program screenshot for the correct indentation.…
Q: Write a program that gets two car information from the user, compares them, and print out the…
A: First, we need to define Car class with the attributes and methods and then define the main function…
Q: Write a program that calculates the electricity bill. The rates of electricity per unit are as…
A: Introduction of program In this program, we will give input on Electricity Unit Consumed. Charges…
Q: Write a program that computes the cost of painting and installing carpet in a room. Assume that the…
A: In this question, we will create a class ROOM to store the properties of the room and to calculate…
Q: Write a program that prompts the user to enterthe month and year and displays the number of days in…
A: Program: import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Note: as programming language is not mentioned c++ is used. The program with output is given below
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Since programming language is not mentioned in the question, we will answer this question in the C++…
Q: Write a program that computes and displays the charges for a patient's hospital stay. First, the…
A: Program: // Header files section#includeusing namespace std; //Functions prototypesdouble…
Q: Write a program that calculates the cost of 3 bags of fruit. The 4 possible fruits are pears which…
A: A loop is used to execute a block of code several times. The number of iterations is based on a…
Q: Write a program that reads from the user the registration fees, number of credits required for a…
A: Given: To write a Java program that reads from the user the registration fees and other requirements…
Q: Write a program that lets the user guess whether a flipped coin displays the head or the tail. The…
A: GIVEN: Write a program that lets the user guess whether a flipped coin displays the head or the…
Q: Write a program that computes and displays the charges for a patient’s hospital stay. First, the…
A: Since you haven't mentioned the programming language, we are answering this in C#.
Q: Write a program that begins by reading a number of cents from the users as an integer (this is input…
A: In the Python 3 programming language, set all needed currency named variables to 0 to make floor…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: ********************************************* // iostream in C++ is the standard library which…
Q: Write a program that prints a grocery receipt of items purchased. The program must create variables…
A: NOTE : Since the programming language is not defined. So the programming language used here is…
Q: The manager of a football stadium wants you to write a program that calculates the total ticket…
A: - We have to create a code for the ticket sales in C++. - We have to create a flowchart also.
Q: Write a program that displays a simulated paycheck. The program should ask the user to enter the…
A: Define header file <iostream>, <cstring> , <string> and <iomanip>. Define…
Q: Write a program that calculates how much money you’ll end up with if you invest an amount of money…
A: In Cpp Program #include <iostream>#include <cmath>using namespace std; int main(){int…
Q: Write a program to read basic salary (bsalary) and sales (sales) then calculate and print the net…
A: C++ program for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: Write a program that will take as input the type of restaurant the user ate at, the cost of the…
A: Use if else if conditions to check each type and add tax in every case
Q: Write a program that computes and displays the charges for a patient’s hospital stay. First, the…
A: Program: #include <iostream> #include <iomanip> using namespace std; void…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Purpose of the program: This program computes the total cost of different types of lumber for an…
Q: How do i solve this problem in python? ( has 3 steps)
A: NOTE:The given information is incomplete (Formula to calculate the minutes to walk or run for a…
Q: Write a program that computes and displays the charges for a patient's hospital stay. First, the…
A: The above question is solved in step 2 :-
Q: For this assignment, write a program named PizzaPrices that prompts the user to make a choice for a…
A: c# program for Pizza Price using System; class MainClass { public static void Main (string[] args)…
Q: Write a program that computes the fuel efficiency of a multi-leg journey. The program will first…
A: Python code :- def question9(): print("Question 9) # arrays to store miles and gas used…
Q: Write a program that has 2 variables: weeks and days declared as integer type. Enter number of…
A: Logic:- declare two variables week and days. Input number of week from user. Days=week*7 display…
Q: Write a program that computes the fuel efficiency of a multi-leg journey. The program will first…
A: We need to write a Python program for given scenario.
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Program Approach: Declare necessary variables in main function. Define float bf method which…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: PROGRAM: //header files for I/O operations #include<iostream> #include <iomanip> using…
Q: Write a program that reads the following information and prints payroll statements. These are the…
A: <?php //getting full name from user $fullname = readline('Enter fullname : ');…
Q: The manager of a football stadium wants you to write a program that calculates the total ticket…
A:
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: Write a program that begins by reading a number of cents from the users as an integer (this is input…
A: Initialize all required currency named variable with 0 in python3 programming language so that the…
Q: CREATE A PROGRAM THAT ASKS THE USER IF HE/SHE IS PWD OR SENIOR CITIZEN IF YES, THEN GIVE 20% OFF IF…
A: As no programming language is mentioned here, we are writing this program in python price =…
Q: Write a program that calculates the attendance percentage for students, there are total 120 working…
A: Note: In this question the coding language is not specified then we are doing this question in the…
Write a program that prints a grocery receipt of items purchased.
- The program must create variables for the following items:
- Milk = $2.00
- Eggs = $ 3.00
- Bread =$4.00
- Orange Juice =$3.50
- Apples = $4.00
- Cookies = $3.25
- Water = $3.00
- A coupon of $1.00 was used. use a constant for a coupon.
- Calculate the bill, assume that 1 unit of all items was purchased
- use java
programming language
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Write a program that prints a grocery receipt of items purchased. The program must create variables for the following items: Milk = $2.00 Eggs = $ 3.00 Bread =$4.00 Orange Juice =$3.50 Apples = $4.00 Cookies = $3.25 Water = $3.00 A coupon of $1.00 was used. use a constant for a coupon. Calculate the bill, assume that 1 unit of all items was purchased8. Total Purchase A customer in a store is purchasing five items. The prices of the five items are as follows: Price of item 1= $15.95 Price of item 2= $24.95 Price of item 3= $6.95 Price of item 4= $12.95 Price of item 5= $3.95 Write a program that holds the prices of the five items in five variables. Display each item's price, the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 7 percent.Write a program that declares a variable that represents minutes worked on job and assign a value. Display the value in hours and minutes
- A business that uses functions to calculate the weekly payment amounts of employees in a workplace.you are asked to write a program.The weekly payment amount of an employee depends on the following variables:- Number of hours worked - (minimum: 0, maximum: 60)- Hourly wage - (minimum: 0.00 TL, maximum: 30.00 TL)- Number of exemptions - (minimum: 0, maximum: 5)Using these 3 values,- Gross payment amount- General income taxLocal income tax- Social security amount- Net payment amountwill be calculated. →The maximum number of hours an employee can work before earning overtime pay is 40 hour. If the number of hours worked is less than or equal to 40, the gross payment amount will be equals the product of the wage. If the number of hours worked is more than 40, the gross payment amount is 40 times the hourly wage. plus 1.5 times the hourly rate for every hour over 40 →The general withholding tax is 55.77 TL for the weekly payment period. The employee is subject to general taxation the gross…Simulate 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 playedWrite a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an inpatient or an outpatient. If the patient was an inpatient, the following data should be entered: The number of days spent in the hospital The daily rate Charges for hospital services (lab tests, etc.) Hospital medication charges If the patient was an outpatient, the following data should be entered: Charges for hospital services (lab tests, etc.) Hospital medication charges Use a single, separate function to validate that no input is less than zero. If it is, it should be reentered before being returned. Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the inpatient data, while the other function accepts arguments for outpatient data. Both functions should return the total charges
- Use C++ programming language A customer in a store is purchasing five items. The prices of the five items are:Price of item 1 = $15.95Price of item 2 = $24.95Price of item 3 = $6.95Price of item 4 = $12.95Price of item 5 = $3.95Write a program that holds the prices of the five items in five variables. Display each item’sprice, the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is7%.Problem: A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instructions: Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm. In the program flow, input and checking of hourly pay rate should come before that of the number…The Nim game. Write a program for a two-player version of the game Nim: a human player will play against the computer. The game is simple: players take turns removing from 1 to 4 sticks from a pile of 13 sticks; the player who picks up the last stick wins the game. Here’s some pseudocode for the Nim game. Start by initializing some variables that will allow you to keep track of the state of the game: One variable should record how many sticks there are left in the pile; initially, this variable must be initialized to 13. There are two players in the game, who take turns. To remember who’s turn is next, use a variable with two states (= values). Say the variable is 1 if the human player is next, and it is 2, if the computer’s turn is next. Pick randomly the player who should start the game. Then, start the main loop of the game: the game should continue for as long as there still are sticks (at least one) to pick. In each repetition of the game loop, one player will play their turn:…
- A mobile phone service has three different data plans for its customers: PLAN A: For $19.99 per month, 2 gigabytes are provided. Additional usage costs $8.00 per gigabyte. PLAN B: For $59.99 per month, 8 gigabytes are provided. Additional usage costs $8.00 per gigabyte. PLAN C: For $79.99 per month, Unlimited data is provided. Write a program that calculates a customer’s monthly bill. It should input the customer name, which plan was purchased, and how many gigabytes were used. It should then create a bill that includes the input information and the total amount due. It should also display how much money plan A customers would save if they purchased plan B or C, and how much money plan B customers would save if they purchased plan C. If there would be no savings, no message should be printed. Wherever possible, use named constants instead of numbers.Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person’s BMI is calculated with the following formula: BMI = weight × 703/height2 where weight is measured in pounds and height is measured in inches. The program should display a message indicating whether the person has optimal weight, is underweight, or is overweight. A sedentary person’s weight is considered to be optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweight.Input Validation: Determine what inputs the program needs the user to enter and what legal values the program should accept for these inputs.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 program that prompts the user to enter the cost of renting one room, the number of rooms booked, the number of days the rooms are booked, and the sales tax (as a percent). The program outputs the cost of renting one room, the discount on each room as a percent, the number of rooms booked, the number of days the rooms are booked, the total cost of the rooms, the sales tax, and the total billing amount. Your program must use appropriate named constants to store special values such as various discounts.