A customer want to buy five items. He has only 120.0 OMR with him. The price of the products are listed: Price S.NO. Item (OMR) Bag 5.50 2 Table 25.00 3 Chair 15.25 4 Cupboard 32.50 Computer 25.25 Table 6 Shoe Rack 15.00 Write an algorithm and draw a flowchart to check whether he can buy all the 6 products, aiso 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: 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: 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 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: Suppose you are a computer salesman and your income depend on the total sales and commissions earned…
A: Given:- income=total_sale+Commision; Commision=total_sale*Commision_rate;
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 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: The number of permutations of a set of n items taken r at a time is given by the following…
A: Program code: //include the required header file #include<iostream> using namespace std;…
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: 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: 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: 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: In business applications, youare often asked to compute the mean and standard deviation of data. The…
A: Program Plan: input number using for loop. Use for loop to compute mean. Use another for loop to…
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: With the statement, With the statement. int grade-69: if(grade>=70&.&gradec-100) int grade-70;…
A: There is a total of 3 questions asked. 1. There is one c code is given and we have to find its…
Q: Abdullah wants to furnish his office. He has 161 OMR. He wants the following produ Desk with 52.30…
A: hi
Q: A customer want to buy five items. He has only 120.0 OMR with him. The price of the products are…
A: Algorithm: Let item be the items purchased by the customer let price be the price of each item…
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 checks to see if the user won the lottery. Assume the winning lottery numbers…
A: Write a program that will generate the following output using the given conditions: Test Case 7…
Q: Exercise 4 Write a program that allows a user to play HiLo game. User wins if he/she can guess the…
A:
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: 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: (1) Ask for the number of guests. Users will enter a negative number when guests leave and a…
A: Below is the python program and its approach: - Approach: - Declaring the variables and storing…
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: Trace the following flowchart and complete the Table 1 (fill in ALL the blanks). Start n = 13 F n0…
A: Flow Chart - Flow chart is basically a graphical representation of a program or algorithm. There are…
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: Suppose that you work for a beverage company. The company wants to know the optimal cost for a…
A: Code import java.util.*;public class Main{ public static void main(String[] args) { int…
Q: Write a program that accepts the names of three political parties and the number of votes each…
A: Actually, program is a executable software that runs on a computer.
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: Ask the user to enter a day of the week in 3 letters. * Respond with the meal plan for that day.…
A: PROGRAM: //Header file import java.util.Scanner; //Defining the class class WeeklyMeakPlan {…
Q: QUESTION 8 Kebabo Internet Services offers customers with 600 weekday minutes for a flat rate of…
A: ANSWER:-
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: CHALLENGE 1.3.4: Read user input numbers and perform a calculation. АCTIVITY Read two numbers from…
A: Here we have statement to accept the 1st number from user. Now we need to use same statement to…
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: 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: diagram last two digits of your student number (For example, if your student number is 1910602041,…
A: Here value of n is 34 So T = 34%25 = 1 i=2 j=0 i<9 -> True j=2 j<10 -> True T= T+j+i =…
Q: A teacher would like his students to play a small game. The rules of the game require that the…
A: #include <iostream>using namespace std;int main(){ double number,score; string color;…
Q: Q4. Write a program that calculate the person's Body Mass Index (BMI). The BMI is often used to…
A: Given: Write a program that calculates and displays a person’s body mass index (BMI). The…
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: 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: 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: 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
- Write a program named GuessingGame that generates a random number between 1 and 10. (In other words, in the example above, min is 1 and max is 11.) Ask a user to guess the random number, then display the random number and a message indicating whether the users guess was too high, too low, or correct.CREATE A PROGRAM THAT ASKS THE USER IF HE/SHE IS PWD OR SENIOR CITIZENIF YES, THEN GIVE 20% OFF IF HE IS BOTH PWD AND SENIOR CITIZEN, GIVE 20% ONLY ASK IF HE HAS A MEMBERSHIP CARD. IF YES, GIVE ANOTHER 3% OFFIn this task, you are being asked to draw a flowchart of the given problem, and then convert thatflowchart into Java code.A supermarket awards coupon depending on how much a customer spends on groceries. Forexample, if you spend $50, you will get a coupon worth eight percent of that amount. The followingtable shows the percent used to calculate the coupon awarded for different amounts spent. Write aprogram that calculates and prints the value of the coupon a person can receive based on groceriespurchased.Here is a sample run:Please enter the cost of your groceries: 14You win a discount coupon of $ 1.12. (8% of your purchase) Money Spent Coupon PercentageLess than $10 No couponFrom $10 to $60 8%More than $60 to $150 10%More than $150 to $210 12%More than $210 14% NOTE : using java
- A shop sells books, maps and magazines. Each item is identified by a unique 4– digit code. All books have a code starting with 1, all maps have a codestarting with 2 and all magazines have a code starting with 3. The code 9999is used to end the algorithm. Write an algorithm in the form of a flowchart thatinputs the codes for all items in stock and outputs the number of books,number of maps and the number of magazines in stock. Include anyvalidation checks needed.Given a directed line from point p0(x0, y0) to p1(x1,y1), you can use the following condition to decide whether a point p2(x2, y2) is onthe left of the line, on the right, or on the same line.Write a program that prompts the user to enter the three points for p0, p1, and p2and displays whether p2 is on the left of the line from p0 to p1, to the right, or onthe same line.Ahmed wants to gift his friend. He has 82.300 OMR. He wants thefollowing products:Sport suite with 15.700 OMRSport shoes with 32.00 OMRSport water bottle with 4.50 OMRHeadphone with 8.25 OMRiPod with 9.88 OMRWrite an algorithm and draw a flowchart to check whether he can buy all the aboveitems. Display the total, and the remaining amount in OMR that Ahmed will haveif any
- A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consume in a day. Then, she calculates the number of calories that result from the fat using the following formula: Calories from fat = Fat grams × 9Next, she calculates the number of calories that result from the carbohydrates using the following formula: Calories from carbs = Carbs grams × 4Create an application that will make these calculations. In the application, you should have the following methods:• FatCalories–This method should accept a number of fat grams as an argument and return the number of calories from that amount of fat.• CarbCalories–This method should accept a number of carbohydrate grams as an argument and return the number of calories from that amount of carbohydrates.***Microsoft Visual Studios (C++)*** Write a program that given two coordinate pairs and a third single coordinate will linearly interpolate or extrapolate the third second coordinate. For example, let's say at 50 degrees Celsius the length of a metal rod is 5.4 cm and at 60 degrees Celsius the length is 5.5cm. I can interpolate the length at 53 degrees Celsius by doing 5.4cm + 3*(.1/10)=5.43cm. Your program does not need to continuously run, but should prompt the user for two coordinate pairs, the third first coordinate and return the extrapolated or interpolated third second coordinate.****Microsoft Visual Studios***** Write a program that prompts the user for a number of decimal places between 1 and 10 and returns the number of terms in the infinite series needed to reach that level of precision (the estimated e is equal to the actual e to the 5th decimal place for example). Your program does not need to run continuously.
- Write a program that prompts a user to enter a year between 1 and 2499 and prints its century in the format such as 1st, 2nd, 3rd, 4th, etc. please use a switch statement. for what we have done in class so far we have only used #include <iostream> <fstream> <cmath> <string> <iomanip>, so if possible if this can be done using that so I can understand for my next assignment that would be great thanks! Test Run 1:Enter a year between 1 and 2499 -- 19231923 is in the 20th century Test Run 2:Enter a year between 1 and 2499 -- 22022202 is in the 23rd century Test Run 3:Enter a year between 1 and 2499 -- 2630Wrong year!In business applications, youare often asked to compute the mean and standard deviation of data. The mean issimply the average of the numbers. The standard deviation is a statistic that tellsyou how tightly all the various data are clustered around the mean in a set of data.For example, what is the average age of the students in a class? How close are theages? If all the students are the same age, the deviation is 0.Write a program that prompts the user to enter 10 numbers and displays the meanand standard deviations of these numbers using the following formula:Write a javascript program that calculates how much a person would earn over a period of time. if his or her salary is one dollar the first day and two dollars the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing how much the salary was for each day, and then show the total pay at the end of the period. Input Validation: Do not accept a number less than 1 for the number of days worked.