A customer want to buy five items. He has only 120.0 OMR with him. The price of the products are listed: of S.NO. Item Price on (OMR) Вag 5.50 2 Table 25.00 Chair 15.25 4 Cupboard 32.50 Computer 25.25 Table Shoe Rack 15.00 Write an algorithm and draw a flowchart to check whether he can buy all the 6 products, also display the remaining amount that the customer will have, if any.
Q: The manager of Mama Calari’s Pizza Palace wants a program that calculates and displays the number of…
A: The manager wants to calculate the number of pizza slices into which the pizza can be divided.…
Q: Using Flowgorithm, I have to create a guessing game. I have to let the user know if they are…
A:
Q: Write a program that determines a student grade's given his/her final score. Use the following table…
A: According to the Question below the Solution: Output:
Q: Draw a flowchart that will get the roots of a quadratic equation. If one of the roots is greater…
A: Step Form Algorithm: Get started. Announce the required variables. Indicate the user to enter…
Q: Given a directed line from point p0(x0, y0) to p1(x1,y1), you can use the following condition to…
A: Program: import java.util.Scanner;public class Main{ public static void specifyposition(int…
Q: Ahmed wants to Furnishes his office. He has 160.55 OMR. He wants the following products Desk with…
A: Algorithm:- Step 1 Start Step 2 initial_amount = 160.55 Step 3 desk_price = 52.30 Step 4…
Q: Given the following statement: int v = rand() % 86 + 25; What is the range of v? A. [0, 86] B. [0,…
A: Here in this question we have given a code and we have asked to find the range for this variable.…
Q: Write a program that calculates marked area of the square, given input of square length and the…
A: please upvote for my efforts ! answer: #include <stdio.h> #define M_PI 3.142int multiple…
Q: Write a program that calculates and displays a person's body mass index (BMI). The BMI is often used…
A: Answer in step2
Q: Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9 oz), medium (12…
A: Given requirement, Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9…
Q: Ahmed wants to gift his friend He has 82.300 OMR. He wants the following products Sport suite with…
A: 1)Start 2)Initialize cost of all items=0 3)Intialize amount =82.300 4)Now ,calculate cost of all…
Q: Rewrite this if/else if code segment into a switch statemen if (numBooks >=2 && numBooks 6 &&…
A: Given: if(numbooks>=2 && numbooks<=4) cout<<"you earned zero points \n";…
Q: Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9 oz), medium (12…
A: C++ used to answer this question
Q: For the expression, c = (a!=b)?d:e; e will be assigned to c if: a is greater than b O a is less than…
A: Given statement is ternary expression c=(a!=b)?d:e; If a!=b is true then it gives d I.e, a and b…
Q: Abdullah wants to furnish his office. He has 161 OMR. He wants the following produ Desk with 52.30…
A: hi
Q: Suppose you save $100 each month into a savings account with the annual interest rate 5%. So, the…
A: Given: Suppose you save $100 each month into a savings account with the annual interest rate 5%. So,…
Q: Write a program that prompt the user to enter a food product category, and price in USD. The program…
A: C++ Program for above : #include <iostream> using namespace std; int main() { cout…
Q: You sell regular coffee at 10 rs/bag, cappuccino coffee at 13 rs/bag, and mocha coffee for 15rs/bag.…
A: Note: Here you didn't mention any programming language so we are creating the program in the C++…
Q: A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her…
A: Program Approach Make a method to return the total calories from number. Input the Fat Grams.…
Q: Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9 oz), medium (12…
A: #include <iostream> #include <iomanip> using namespace std; //Named constants const…
Q: Ahmed wants to Furnishes his office. He has 160.550 OMR. He wants the following products: Desk with…
A: Algorithm: Store total Amount in a variable. store values of desk chair file cabinet paper shredder…
Q: Example 6: Write an algorithm and draw a flowchart to a) read an employee name (NAME), overtime…
A: Define header file <iostream> for input output operations. Define header file <string.h>…
Q: Answered: Run the program + Ô https://learn.zybooks.com/zybook/SNHUIT140V3/chapter/1/section/22 =…
A: Algorithm: Start Read age, weight, heartRate, time Calculate…
Q: A customer want to buy five items. He has only 120.0 OMR with him. The price of the products are…
A: Algorithm: Start Initialize amount=120.0 OMR Initialize sum=0 Store all the given prices in an…
Q: 4. Ahmed wants to gift his friend. He has 82.300 OMR. He wants the following products: Sport suite…
A: Algorithm Step 1- Start Step 2- Amount=82.300,Sport_suit=15.700, Sport_shoes=32.00,…
Q: Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9oz), medium (12oz),…
A: Required: Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9oz),…
Q: Make a flowchart where a program dispenses cash at an ATM machine that has been upgraded to dispense…
A: Since you needed the output screenshot I am attaching for both conditions thatis when amount is…
Q: I have a calculator program that needs to prompt the user to try again if he does not do what the…
A: In the given program code, You are trying to use fail() method, this method is used to check that…
Q: Write a v program There are four types of fruits Apples, Oranges, Bananas and Grapes. Eachs…
A: Always mention in which program we should have to write program. We only give you flow chart of this…
Q: Write a program using else if to input the number of students(stu) and number of teachers(tea) in…
A: C used to answer this question
Q: 1. Given an integer, n , perform the following conditional actions: a. If n is odd, print Weird b.…
A: NOTE:“Since you have asked multiple questions, we will solve the first question for you. If you want…
Q: A client in a store is buying 5 items: shirt, trouser, hat, shoes, and perfume. Write a program that…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Jason opened a coffee shop at the beach and sells coffee in three sizes: small (9 oz), medium (12…
A: #include <iostream>using namespace std;//function to show the user how to use the programvoid…
Q: Objective: BN booksellers has a book club that awards points to its customers based on the number of…
A: Here I have taken input from the user and then stored it in a variable. Next, I have used a switch…
Q: A sales event at Trader Jane's is reducing some items by 25%. Store that value to a properly named…
A: Introduction of Program The C++ Program provided with the Reducing Offer and the Sales Tax values of…
Q: Suppose that you work for a beverage comnpany. The company wants to know the optimal cost for a…
A: The program is written in C language.
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: Complete the following program that finds which of the time points comes first. The time is…
A: (1 ) in if condition it will print that time1 comes first means hours of time1 must be less then…
Q: multiple paths are all based on checking the same variable/value, it is recommended to use if and…
A: Explanation: We employ logical operators to test several conditions in an if or elif clause. That…
Q: Q4. Write an algorithm and draw a flow chart to get cgpa of student. If CGPA is more than equal to…
A: Algorithm: Step 1: StartStep 2: Read the CGPAStep 3: if CGPA >= 2.7 then go to step 4 . else go…
Q: Write a javascript program that calculates how much a person would earn over a period of time. if…
A: Please check step 2 & 3 for program and output
Q: Ask for and get three doubles from the user; the numbers represent the values for a, b, and c that…
A: Roots of a quadratic equation : The roots of a quadratic equation, can be calculated by using the…
Q: draw a flowchart of the given problem, and then convert that flowchart into Java code. A supermarket…
A: A flowchart is a graphical representation of steps used to solve a particular problem. The required…
Q: Consider a vending machine that offers the following options: [1] Get gum [2] Get chocolate [3]…
A: Objective: An application should be built considering the functionalities of a vending machine. It…
Q: Example 6: Write an algorithm and draw a flowchart to a) read an employee name (NAME), overtime…
A: Include the header files. Declare the structure with employee details. In the main function, create…
Q: 3. A fast food restaurant sells the following products: Product Burgersteak Softdrinks Price PhP…
A: I have given C++ code to count the total amount paid by customer to by products.
Q: 4. Abdullah wants to furnish his office. He has 161 OMR. He wants the following products: Desk with…
A: An algorithm is a finite number of steps to perform a specific task. An algorithm is independent of…
Q: Suppose that you work for a beverage company. The company wants to know the optimal cost for a…
A: I have given an answer in step 2.
Q: A cloth showroom has announced the following seasonal discounts on purchase of items. Purchase…
A: We use if statement within the switch statement. Algorithm Start. Prompt menu to press 1. for Mill…
Q: You have 3 buckets, the first of size 4 gallons, the second of size 10 gallons and the third of size…
A: Question:
Step by step
Solved in 2 steps with 1 images
- A high school has 1000 students and 1000 lockers, one locker for each student. On the first day of school, theprincipal plays the following game: She asks the first student to open all the lockers. She then asks the secondstudent to close all the even-numbered lockers. The third student is asked to check every third locker. If it isopen, the student closes it; if it is closed, the student opens it. The fourth student is asked to check every fourthlocker. If it is open, the student closes it; if it is closed, the student opens it. The remaining students continuethis game. In general, the nth student checks every nth locker. If it is open, the student closes it; if it is closed,the student opens it. After all the students have taken turns, some of the lockers are open and some are closed.The program below, when ran, will prompt the user to enter the number of lockers in the school. After thegame is over, the program will output the number of lockers and the lockers numbers of the lockers…assignment is to write a program that helps an interactive user search for “near misses” of the form (x, y, z, n, k) in the formula xn + yn = zn, where x, y, z, n, k are positive integers, where 2< n <12, where 10 <= x <= k, and where 10 <= y <= k. When your program starts, it should ask the user for n (the power to use in the equation) and ask the user of k (which limits the range of x and y possibilities to test). For now I am not limiting k, except to say that it should be > 10. You may want to impose an upper limit on k if you find that your program is crashing due to overflowing integer variables, but don’t make it TOO small, or you will limit the kinds of near misses you can find. Your program should then look for “near misses” of the form xn + yn <> zn. A “near miss” is a RELATIVELY small difference between (xn + yn) and znfor some integers x, y, and z. Your program should systematically search for x, y, and z combinations that are “almost right.” NOTE…Mutiple Answers Which of the following matches regexp /(very )+(fat )?(tall|ugly) man/a) very fat manb) fat tall manc) very very fat ugly mand) very very very tall man Please Answer With Detailed Explanation!
- Implement a program that calculates the bill of a sandwich stand. The program should ask theuser to enter the quantity of each of the items. Then compute 13% GST on the total amountand generate a bill with items, their quantity along with price of each item and the total(inclusive GST). The stand has the following items:- Petti for $2.50- Drink for $1.25- Extra cheese topping for $1.25Suppose you can buy chocolate bars from a vending machine for $1 each.Inside every chocolate bar is a coupon. You can redeem 7 coupons for 1chocolate bar from the machine.For example, if you have $20, you can initially buy 20 chocolate bars.This gives you 20 coupons. You can redeem 14 coupons for 2 additionalchocolate bars. These 2 chocolate bars have 2 more coupons, so you now have atotal of 8 coupons. This gives you enough to redeem for 1 final chocolate bar.Write a recursive function that would accept the amount of dollars andcoupons as its parameters and output the total number of chocolate bars thatcan be bought (including those redeemed via coupons).Write a test program in C++that would allow the user to enter amount of dollarsand then use the recursive function to compute the number of chocolate barsthe user can buy, and output the number to the screen.Suppose you are a participant in a game show. You have a chance to win a motorbike. You are askedto select one of the 500 doors to open; the motorbike is behind one of the 500 doors; the other remaining doorsare losers and have balloons behind them. Once you select a door, the host of the game show, who knowsexactly what is behind each of the door, randomly opens 480 of the other doors all at once that s/he for sureknows are losing doors and have balloons behind them. Then s/he reoffers you – whether you would like toswitch to the other doors or keep your initial or original selection as before. Now in this case, you are goingto make decision based on probabilistic reasoning. Therefore, whenever you are reoffered by the host to dothe selections among the remaining unopened doors, what is the probability of winning for each of theremaining unopened doors (including your original selection)? Do you want to make a switch based on theprobabilistic reasoning? If you are switching, which…
- Answer all questions elsewill give u direct downvoteSuppose we have a nice young couple who borrow $700000 from the bank, at an annual interest rate of3.124%. The mortgage is a 30 year loan, so they need to pay it off within 360 months total. Our happycouple decide to set their monthly mortgage payment at $2000 per month. Will they pay off the loan intime or not?Note that the monthly balance will be calculated asbalance = (im × previous balance) - monthly paymentwhere the convert annual interest to a monthly multiplier im is calculated as im = (1 +i)1/12 and i = annualinterest rate.Write a loop for track the total payment in 360 months so that we can evaluate if the couple can pay off theloan. Write in R Please and thank you.You are given n users, and their times that they log in and out of a website: You are interested in which users are on the site at the same time. For example, you are given the following 5 users and their times: User 1- In: 1 Out: 4 User 2- In: 2 Out: 5 User 3- In: 7 Out: 8 User 4- In: 9 Out:10 User 5- In: 6 Out:10 This gives the distinct users that are on the site at the same time as (1,2), (4,5), and (3,5). Given n elements, write pseudocode for an algorithm that would take n^2 time to compute the number of pairs of users that are on the site at the same time
- A group of m people is considering sharing the cost of buying some items for their summer camp. There are a total of n possible items to purchase. Each person writes a list of the items they are interested in purchasing on a paper. For example, person one may write “boat, trampoline, hot tub,” whereas person two may write “ hot tub, kayak, paddleboard”. There is no limit to how many items a person registers on their sheet. The goal is to determine if at least k items can be purchased. The following rules apply 1. The cost of any purchased item must be split equally among all those who listed that item on their sheet. No person can refuse to contribute to an item chosen for purchase, which is listed on their sheet. 2. Since each person has a limited budget, they may only contribute to at most one item on their list. The problem of determining if at least k items can be purchased is called SummerCamp. Show that this problem is NP-complete.The Monty Hall Cash game costs $12 to play. Once you pay, you havea choice of three doors. Behind one door is $20, behind the other twois absolutely nothing (i.e. $0). You pick a door, say number 1, andthe host running the game, who knows what’s behind the doors, opensanother door, say number 3, which has absolutely nothing. He says toyou, “Do you want to switch to door number 2?”. You can decide toswitch doors, or stay with your initial choice. You “win” whatever isbehind the door you end up choosing. Use a python Jupyter notebook to run simulations of the gameto estimate/approximate the expected value of the game if youalways switch, and the expected value if you always stay.CThere is a road, the starting coordinate is 0, and the coordinatesof the line are given to draw a black line, for example, five linesegments for drawing black lines, (5, 6), (1, 2), (4, 8), (7 , 9)and (5, 8), as shown belowOutput:Length of the black line on the road: 6Maximum number of overlaps: 3Maximum number of overlaps Length of black line: 2 The first row is a positive integer N, there are N line segments for drawing black lines.Then there are the integer values of the start point coordinates and the end point coordinates of the line segment of the black line. Sample 15160 180150 200280 300290 330190 210Output:Length of the black line on the road: 110Maximum number of overlaps: 2Maximum number of overlaps Length of black line: 40 Sample 21120 120Output:Length of the black line on the road: 0Maximum number of overlaps: 0Maximum number of overlaps Length of black line: 0