F &B Fast-Food Restaurant offers three types of menu. Each customer can make an order based on the following information: Menu Types Kids meal Regular meal Combo meal Menu Code Price K R RM 7.50 RM 16.40 RM 28.70 M Every customer is charged 6% government tax and 10% service charge of the total price. Write a program that will help the cashier to input the menu code and the quantity ordered by customer. Display the appropriate message when the user enters the invalid menu code. The program will calculate and display the total price that a
Q: 2. Write a simple payroll program that will display employee's information. The program should…
A: pay roll program that will display employee's information
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: Write a program using if-blocks that allows the user to input a taxable income value into a text…
A: According to the Question below the Solution: HTML: <!DOCTYPE html> <html>…
Q: Write a program which should display 4 items (keyboard, mouse, monitor and speaker) with their…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it…
Q: Engineering P4.4.1.9 A mass m is attached to the end of a rope of length r= 3 meters. The rope can…
A: Required: A mass m is attached to the end of a rope of length r = 3 meters. The rope can only be…
Q: ach trial, you have to inform the user, either he/she has guessed it correctly or not, and the…
A: //Source code in python import random import math //Taking inputs lower=int (input("Enter Lower…
Q: Chapter 5 Selection Statement ASSIGNMENT3 1. Using the switch statement, write a program that…
A: As per our policy, "Since you have asked multiple questions, we will solve the first question for…
Q: there are three seating categories at a stadium. for a softball game, class A seats are $30, Class B…
A: In the above code, it has been asked to print the how many tickets for each class of seats were sold…
Q: 1. Suppose you have a group of people who need to be transported on buses and You can charter a bus…
A: start print "TRANSPORTATION CENTER\n"; cout<<"---------------------------------------\n";…
Q: Program2: function Write a program that prompt the user to enter two positive integer numbers x and…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //get…
Q: The factorial of n is the product of all the nonnegative integers from 1 to n. for 8! = 1 * 2 * 3 *…
A: Given: The factorial of n is the product of all the nonnegative integers from 1 to n. for 8! = 1 * 2…
Q: In a course with 2 midterms and 1 final exam, you will write a code that determines the remainder…
A: #include <stdio.h> int main(){ float first, second, final; float avg; printf("\n…
Q: Suppose the Great Frederick Fair wants to update its ticketing software. They need you to write a…
A: A required Python program is as follows, #Set the constant BASIC_PRICE=40 BASIC_PRICE_Fredrick=35…
Q: Malcolm Movers charges a base rate of $200 per move plus $150 per hour and $2 per mile. Write a…
A: using System;class MoveEstimator { static void Main() { int baseRate = 200, hourRate =…
Q: 5.9 (Baggage Counter Charges) A baggage counter charges a $0.50 minimum fee to deposit a bag for up…
A: #include<stdio.h> float determineCharge(float hours){ //function to calculate charge per…
Q: Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used…
A: C++ Program: #include <iostream>#include <cmath> // Included for using pow()…
Q: A mail order shop sells ten different products whose retail prices are shown in the following table:…
A: As no programming language is mentioned I will be using C++ to code.
Q: A mail order house sells five different products whose product numbers and retail prices are:…
A: Required: c++
Q: 2.12 LAB: Driving costs Driving is expensive. Write a program with a car's gas mileage…
A: LAB: Driving costs - functions Driving is expensive. Write a program with a car's miles/gallon and…
Q: QUESTION 1 PROBLEM: Write a program that prompts the user to input the amount of money that an ATM…
A: In the given output the count of 100 peso is multiplied by 100 so to the same output I have also…
Q: rice calculations, using the rules*: • The basic price of a ticket is $40. • Senior citizens (age >=…
A: the program is an given below : def main(): ticket_base_price = 40 name = input('Enter…
Q: Suppose a new member of the city council has to be chosen from three candidates and suppose there…
A: Here is the approach :- As the approach is already provided in the quesiton itself . still it have…
Q: Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game…
A: C++ Program for above : #include <bits/stdc++.h> using namespace std; int solve(int x,…
Q: Exercise 4 Write a program that allows a user to play HiLo game. User wins if he/she can guess the…
A:
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: code for this in C: In college, a student may get a grade of 1.0 (as the highest) to 5.0(lowest).…
A: PROGRAM CODE: The challenge is how to use the supplied formula to highlight the final grade, and…
Q: A mail order house sells five different products whose product numbers and retail prices are:…
A: C++ used to answer this question
Q: (Algebra: solve 2 x 2 linear equations) You can use Cramer's rule to solve the following 2 X 2…
A: Java code: //import Scanner classs from util packageimport java.util.Scanner; public class Main{…
Q: c++ Energy Drink Consumption A soft drink company recently surveyed 16500 of its customers and…
A: #include<iostream> #include<cmath> using namespace std; int main()…
Q: Fox International sells pre-paid calling card with the following features: Calls to USo 1.2 cents…
A: Java program to create the Fox International Calling Card Calculator.This program takes account…
Q: During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer…
A: C++ used to answer this question
Q: Read student's grade 'A','B', 'C','D' or 'F' and print "Good job" when grade entered is either 'A',…
A: Based on the input value, you have to check the condition and you can do this using if statement
Q: 19. The sales manager at Memey Company wants to display a price based on a product ID she enters.…
A: Given: We are given a problem where we have product ID and their corresponding prices. Goal: We have…
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: Canada has three national holidays which fall on the same dates eac Holiday New year's day Canada…
A: Python used to answer this question
Q: Write a program named TypingGrades that allows a user to enter a student’s number of words typed.…
A: Algorithm: Start READ numWords IF numWords<= 15 then: grade='F'ELSE IF numWords<=30 then:…
Q: . Generates a random integer that can be either 15, 16, 17, or 18. (Use the randi or rand function…
A: vInitial=randi(15, 16,17,18) for i=1:30 c=0; for j=1:20 if rem(vInitial(j),2) ~=0…
Q: 1. Federal law requires that hourly employees be paid "time-and-a-half" for work in excess of 40…
A: #ask user for hourly wage hourly_wage = float(input('\nEnter hourly wage: ')) #ask user for Number…
Q: Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used…
A: Let's see the solution in the steps
Q: C++ coding In order to paint a wall that has a number of windows, we want to know its area. Each…
A:
Q: Write a C++ program to estimate your water bill for next quarter. Your water meter measures the…
A: #include <iostream>#include <cmath> using namespace std;int maxallo = 50; //declaring…
Q: 1- A hurricane hit Florida and the freezer is out of power!! Write a program that estimates the…
A: Given:
Q: Q3: Write the algorithm for a program that calculates the cost of the phone bill according to the…
A: The algorithm is shown below. Algorithm PhoneBill(minutes) //Algorithm to find teh total…
Q: program3_1.pyShipping is free for online orders totaling $25 or more at Mississippi.com. Orders less…
A: round() function is used to round the number.Syntax of round function:round(number [, ndigit])number…
Q: enger. The user inputs the ticket type (business/economy), as well as the of the passenger…
A: Q.6 Form1.html <html><body> <form action="calculate.php" method="POST"> Tiket…
Q: 2. Suppose you have a group of people who need to be transported on buses and vans. You can charter…
A: According to the Question below the Solution: Output:
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 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: Write a program that prompts the user to enter a nonnegative integer and outputs the factorial of…
A: Approach To calculate factorial of any non-negative number, we can use either loop (for or while) or…
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }Help Me With C Programming. At Lili's birthday party, there is a game arranged by Jojo as the host. The game is handing out a number of Y candies to a number of X people where all the sweets taste sweet except for the last one candy that tastes like rotten beans. The distribution of sweets will be sequential starting from position Z and if it passes the last position then the distribution of candy continues to the first position. Write down the person in the position of who will get the last candy. Format Input The first line of input is T, which is the number of test cases. The second row and the next number of T lines are X, Y, Z. X is the number of people who will be handed out candy. Y is the number of candies available. Z is the initial position of the person who will be handed out the candy. Format Output A string of "Case #N: " and a number that is the position of the person who got the last candy [Look at Image] In the sample above, for example, which is inputted in the…USE C++ ONLY <IOSTREAM> THANK YOU 2. Write a lunch order program which allows to select lunch items accordingto the lunch menu provided below. (B) Burger with French Fries – 8.99 (C) Chicken and Rice – 9.50 (T) Tuna Sandwich – 10.49 (E) Exita) Write a function void takeOrder(int& burger, int& chicken, int& tuna);which will display the menu item, validate the entries and count how manyorders for each menu item: - Request one character for a lunch item. Menu options must be case insensitive (i.e. ‘E’ and ‘e’ must work). - Validate the input value. - Handle the menu (with a switch statement) to record how many orders for each item is taken. - The function must use pass by reference parameters to return how many orders for each menu item. - End the function only if Exit option is selected.b) Write a function payOrder(int burger, int chicken, int tuna) to print out how many orders are taken for each menu and calculate the total price.c) Call the functions in main() as…
- 5.A)For the code segment below, what should be the values for q will result in kiwi being included in the output? switch(q) { case 1: cout << "apple"; break; case 2: cout << "orange"; break; case 3: cout << "banana"; break; case 4: cout << "pear"; case 5: cout << "grapes"; default: cout << "kiwi"; } B)Evaluate the following segment of a program. Show the procedure to reach your answer. int a = 3, b = 5, c = 2, d = 4; find: !(a / b > 0) && (22 > b % c + d) || !(a * d >= b – d / c) C) Write equivalent expressions for each of the following by using De Morgan’s Law. !(c == ‘r’ || (( y > 2) && !found ))1 - Nuclear Power Plant (python) The nuclear powerplant at Threeyedfish will automatically run a program to print a warning message when the reactor core becomes unstable. The warning message reads: NUCLEAR CORE UNSTABLE!!! Quarantine is in effect. Surrounding hamlets will be evacuated. Anti-radiationsuits and iodine pills are mandatory. Since the message contains crucial information, it should be printed three times. To do this, write a function that prints this message. This function has to be used three times.99.Code in Develop a Java program using NetBeans for Codex. Your program should initially display a menu to the user. The menu should have three options, namely (1) Register for a Training Programme (2) Check Registration details (3) Exit Program (see Figure 3 attached). The program should make use of two functions, registerApplicant() for registering a new applicant andsearchDetails() for searching the registrant details. The registerApplicant() function should accept four lines of arguments namely: the registrant’s name, the registrant’s surname, the registrant’s ID number and training programme. It should then write these details to a text file.To write to the text file or retrieve the product details from the text file, you must have a text file to which you write and store the registrant details. Your text file should be named registrants.txt Also, ensure that the program repeatedly shows the menu until the point when option 3 is selected which terminates the program.
- Your cousin owns an automotive maintenance shop that performs routine maintenance on cars. He has asked you to write a program that will provide a list of services (and their respective prices) to users and allow them to choose any, or all, services they would like and display the final price, including a 34% labor charge, a 14% markup if the car is an import, a 4% Covid-19 Sanitizing fee, and an 9.5% sales tax. Task To accomplish the above, do the following: • Write the two methods outlined below. • Test your program and screenshot your successful test. carMaintenance method This method should accept the make of the car as a parameter (e.g., BMW, Ford, Ferrari, etc.). It should display the services and their prices as follows: Services: Emissions System Repair, Tune Up, Timing Belt Replacement, Transmission Service, respectively: 669.99, 259.99, 885.99, 169.99 These should be stored in parallel arrays. Ask the user to select a service from the list presented for his . Allow the user…Can u debug this Program gets a store's department code and a sale transaction value // Output is a list of department codes, names, and total sales // Additionally, a grand total sales value is displayed start num dept num saleValue num NUM_DEPTS = 5 num total[NUM_DEPTS] string DEPT_NAME[NUM_DEPTS] = "Women's apparel", "Men's apparel", "Children's apparel", "Cosmetics", "Accessories", num grandTotal input dept, saleValue while not eof total[dept] = total[dept] + sale endwhile while dept < NUM_DEPTS output dept, DEPT_NAME[dept], total[dept] endwhile output "Grand total", grandTotal stopThe cost to become a member of a fitness center is as follows: (a) the senior citizens discount is 30%; (b) if the membership is bought and paid for 12 or more months, the discount is 15%; and (c) if more than five personal training sessions are bought and paid for, the discount on each session is 20%. Write a menu-driven program that determines the cost of a new membership. Your program must contain a function that displays the general information about the fitness center and its charges, a function to get all of the necessary information to determine the membership cost, and a function to determine the membership cost.
- 01. Question Code in Develop a Java program using NetBeans for Codex. Your program should initially display a menu to the user. The menu should have three options, namely (1) Register for a Training Programme (2) Check Registration details (3) Exit Program (see Figure 3 attached). The program should make use of two functions, registerApplicant() for registering a new applicant andsearchDetails() for searching the registrant details. The registerApplicant() function should accept four lines of arguments namely: the registrant’s name, the registrant’s surname, the registrant’s ID number and training programme. It should then write these details to a text file.To write to the text file or retrieve the product details from the text file, you must have a text file to which you write and store the registrant details. Your text file should be named registrants.txt Also, ensure that the program repeatedly shows the menu until the point when option 3 is selected which terminates the program. .CHALLENGE ACTIVITY 6.7.3: Function with loop: Shampoo. Write a function print_shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N : Lather and rinse." num_cycles times, where N is the cycle number, followed by "Done.". Sample output with input: 2 1 : Lather and rinse. 2 : Lather and rinse. Done. Hint: Define and use a loop variable. Use Python, please.Question 1 is already done need help with the others though This is the C code I have so far #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int yearBorn, salary; }; struct employees **emps = new employees()[10]; //Added new statement ---- bartleby // function to read the employee data from the user void readEmployee(struct employees *emp) { printf("Enter name: "); gets(emp->name); printf("Enter ssn: "); for(int i =0; i <9; i++) scanf("%d", &emp->ssn[i]); printf("Enter birth year: "); scanf("%d", &emp->yearBorn); printf("Enter salary: "); scanf("%d", &emp->salary); } // function to create a pointer of employee type struct employees *createEmployee() { // creating the pointer struct employees *emp = malloc(sizeof(struct employees)); // function to read the data readEmployee(emp); // returning the data return emp; } // function to…