Question

Hot dogs come 10 to a package and hot dog buns come 8 to a package. 


Write a Flowgorithm program that calculates the number of packages of hot dogs 
and buns needed for a cookout with minimum leftovers. 

The program should ask for the following information:

  1. Number of people attending the cookout
  2. Number of hot dogs allocated for each person

The program should calculate and display the following information:

  • Minimum packages of hot dogs needed
  • Minimum packages of hot dog buns needed
  • Number of hot dogs left over
  • Number of hot dog buns left over

Partial packages of hot dogs and buns CANNOT be purchased.

Remember the following:

  • declare all variables and constants
  • initialize all constants
  • comment box for your name, date and purpose of program
  • use other comments where appropriate
  • DO NOT “hard code numbers” in calculations, use constants
  • use clear prompts for your data input requests
  • clearly label each output number or name
  • modulo operator might be useful
Expert Solution

Want to see the full answer?

Check out a sample Q&A here
Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Is there a way to show this using the app Flowgorithm? I ask because when I put in the code, it calculates but not the way it should. It shouldn't show decimals for the answer considering that the instructions says that partial packages can't be purchased. The answer should be rounded up. And since it doesn't round up, the calculations are off and answers are incorrect. I will attach the code from Flowgorithm and the results. 

0
1
2
3
4
5
7
Source Code Viewer
8
9
10
11
12
13
14
15
16
17
18
19
Auto Pseudocode
Function Main
20 End
+
▶ ► ▷| ||
Breonnaleigh Harrison, 9/13/22
This program calculates the number of packages of hot dogs and buns needed for a cookout with minimum leftovers
Declare Real bunsPack, hotdogPack, numofPeople, dogsperPpl, total, dogsLeft, bunsLeft
Type here to search
Assign buns Pack = 8
Assign hotdogPack = 10
Output "Enter number of people attending the cookout: "
Input numof People
Output "Enter number of hotdogs per person: "
Input dogsperPpl
Assign total = numofPeople * dogsperPpl
Assign hotdogPack = total / hotdogPack
Assign buns Pack = total / buns Pack
Assign dogsLeft = total % 10
Assign buns Left = total % 8
Output "Minimum packages of hotdogs needed: & ToFixed (hotdog Pack, 1)
Output "Minimum packages of hotdog buns needed: " & ToFixed (buns Pack, 1)
Output "Number of hotdogs left over: & dogsLeft
11
Output "Number of hotdogs buns left over: & bunsLeft
75°F Sunny
I
10:38 AM
9/21/2022
X
10
expand button
Transcribed Image Text:0 1 2 3 4 5 7 Source Code Viewer 8 9 10 11 12 13 14 15 16 17 18 19 Auto Pseudocode Function Main 20 End + ▶ ► ▷| || Breonnaleigh Harrison, 9/13/22 This program calculates the number of packages of hot dogs and buns needed for a cookout with minimum leftovers Declare Real bunsPack, hotdogPack, numofPeople, dogsperPpl, total, dogsLeft, bunsLeft Type here to search Assign buns Pack = 8 Assign hotdogPack = 10 Output "Enter number of people attending the cookout: " Input numof People Output "Enter number of hotdogs per person: " Input dogsperPpl Assign total = numofPeople * dogsperPpl Assign hotdogPack = total / hotdogPack Assign buns Pack = total / buns Pack Assign dogsLeft = total % 10 Assign buns Left = total % 8 Output "Minimum packages of hotdogs needed: & ToFixed (hotdog Pack, 1) Output "Minimum packages of hotdog buns needed: " & ToFixed (buns Pack, 1) Output "Number of hotdogs left over: & dogsLeft 11 Output "Number of hotdogs buns left over: & bunsLeft 75°F Sunny I 10:38 AM 9/21/2022 X 10
Console
01
Q Q ▶ HII ■
Enter number of people attending the cookout:
Enter number of hotdogs per person:
Minimum packages of hotdogs needed: 6.6
Minimum packages of hotdog buns needed: 8.3
Number of hotdogs left over: 6
Number of hotdogs buns left over: 2
Type here to search
X=
i
L
77°F Sunny
(4¹))
I
Enter
22
3
10:39 AM
9/21/2022
X
10
expand button
Transcribed Image Text:Console 01 Q Q ▶ HII ■ Enter number of people attending the cookout: Enter number of hotdogs per person: Minimum packages of hotdogs needed: 6.6 Minimum packages of hotdog buns needed: 8.3 Number of hotdogs left over: 6 Number of hotdogs buns left over: 2 Type here to search X= i L 77°F Sunny (4¹)) I Enter 22 3 10:39 AM 9/21/2022 X 10
Solution
Bartleby Expert
by Bartleby Expert
SEE SOLUTION
Students who’ve seen this question also like:
C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
Not helpful? See similar books
C++ Programming: From Problem Analysis to Program Design
marketing sidebar icon
Want to see this answer and more?
Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Describe the functionality of the boots using bullet points.

A: How the computer starts up: When a computer is turned on, a startup process known as booting begins…

Q: Is the transfer from on-premise servers to an laaS architecture accompanied by any governance…

A: Does transitioning from on-premise servers to an IaaS architecture raise any governance concerns?…

Q: Consider the below list of inquiries: What are the most important considerations with data backup…

A: Data backup includes the following steps: In the event that we lose all of our original data, we…

Q: python:  You are counting points for a basketball game, given the amount of 3-pointers scored and…

A: Your question is unclear, but since return is mentioned I am assuming we need to create a function.…

Q: Write a function that takes two queue structures as parameters: original queue and modified queue.…

A: Here is the c++ problem of the above question. See below steps for code.

Q: What are some signs that the useful life of a system is coming to an end?

A: Every software eventually becomes obsolete. changing the software to the newest and best framework…

Q: Create a summary of the adoption of agile based on annual surveys and surveys funded by agile…

A: Introduction: Agile approach is a concept that encourages continuous development and testing…

Q: Is Logistic regression based on a linear combination of parameters as is decision tree

A: Answer is

Q: Dividing two occurrences will activate the CRC decoder.

A: According to the information given:- We have to describe the dividing two occurrences that will…

Q: Write code for Sudoku Depth-First Search(use any programming language)?

A: Code for Sudoku Depth-First Search.

Q: How would you explain the development of a programming language?

A: Programming language: -  Instructions must be sent in a programming language that the device…

Q: What governance considerations should be made when migrating from on-premise servers to an laaS…

A: Solution: The charity management uses the deployment model as an infrastructure as a software (IaaS)…

Q: How does MVC fit into the broader web application framework? Which of the following are advantages…

A: Introduction Model, View, and Controller: Model, View, and Controller (MVC) is an architectural…

Q: What does the word "data abstraction" mean to you? How may a dataset be subdivided?

A: The answer of the question is given below

Q: In the Internet of Things, which of the following is responsible for translating an electrical…

A: The question is to choose the correct option for the given question.

Q: Big data's versatility is shown by the fact that it may be organized or unstructured and comes in a…

A: variety of big data: The five most important and defining aspects of big data are referred to as the…

Q: Phishing is a technique for impersonation and other forms of cyber fraud. What are the most…

A: Introduction: Spoofing involves altering an email address, sender's name, phone number, or website…

Q: Give brief definitions of formal interfaces, information hiding, encapsulation, and abstraction.…

A: Abstraction: Only displaying the most important information and concealing the rest. Using the…

Q: Show how Microsoft World documents are stored and retrieved.

A: Storing a Document A temporary name, such as Document1, Document2, or Document3, is given to a…

Q: What governance challenges must be addressed throughout the transition from on-premises servers to…

A: Migrating: The organization's management manages the charity's information infrastructure using…

Q: Where may information and communication technologies (ICTs) benefit business and education? What are…

A: THe answer of the question is given below

Q: How is service-oriented architecture (SOA) deployed?a

A: SOA is also known as service-oriented architecture.

Q: How is service-oriented architecture (SOA) deployed?a

A: Answer is in next step.

Q: What risks are there when moving a database off of a server

A: Introduction: Moving data from one location, one format, or one application to another is referred…

Q: What is Unpacked BCD Format?

A: Answer:   Unpacked & Packed BCD: In bytes orientation, Binary Coded Decimal is divided into two…

Q: of a two-tier system? What about a client–server design with several tiers?

A: Client Tier and two tier are the two layers that make up a two-tier architecture (Data Tier). It is…

Q: Which part of a client/server architecture is responsible for storage?

A: The client-server architecture, architecture of a computer network in which many clients request and…

Q: (e) Based on the type of hacker you select, explain whether a hacker should be legally prosecuted in…

A: Answer :-

Q: Our plan is to add one level to Flynn's taxonomy. What separates these PCs from their competitors?

A: Introduction: I have provided an answer to this question in the second phase.

Q: How may ICT be implemented?

A: This study looks at the use of a ICT and ICT tools in academic libraries, the use of ICT skills by…

Q: What governance factors should be considered while shifting from on-premises servers to an laaS…

A: What governance considerations should be made when shifting from on-premise servers to an IaaS…

Q: What does it mean to say "information technology"?

A: IT solution: IT encompasses all company computer usage. Information technology builds firm…

Q: Identify, in addition to the firewall we created, three (3) significant and different…

A: A firewall is a fundamental component of every business' cybersecurity infrastructure. Firewalls…

Q: Which of the three levels of abstraction is suitable for data?

A: Data Abstraction is a course of concealing undesirable or immaterial subtleties from the client. It…

Q: Letx is positive integers represented using unary notation. Design a Turing Machine that computes…

A: I have given explanation in the below steps.

Q: What distinguishes database programming from other languages? What specific examples can you provide…

A: Introduction: Every DBMS has administrative and management features. It stipulates that most have a…

Q: Exercise 2.8 Although you always wanted to be an artist, you ended up being an expert on databases…

A: The answer provided below has been developed in a clear step by step manner.

Q: Data storage does not permit direct communication with outside parties. There are several rules that…

A: Explanation: The square box, which is essentially the system, in the data flow diagram represents…

Q: 3. For this task you are going to generate a key and use stream cipher. (a) Use the quadratic…

A: The complete answer is below:

Q: How do network architecture and application architecture differ?

A: The phrase "network architecture" refers to the process of communication being segmented into…

Q: When migrating IT systems to the cloud, where should you check for governance concerns?

A: Due to that What are some of the governance issues to be on the lookout for while switching from…

Q: What is Unpacked BCD Format?

A: :: Solution::

Q: What are some signs that the useful life of a system is coming to an end?

A: The factors that indicate that the system end life is near are: - Every program gets redundant at…

Q: What changes have occurred in programming languages?

A: Introduction: The primary building block of the modern IT industry is, in fact, programming…

Q: How do we know that f(n) has an equal growth rate to g(n)

A: for that let's understand what is thita: It is defined as the tightest bound and the tightest bound…

Q: What advantages does MVC provide their firm in terms of web applications? How may the MVC…

A: The answer of the question is given below

Q: 1-% -% (2's complement)

A: Consider the answer

Q: Memory sticks (USB Flash drives) are used by a vast array of businesses. What are the advantages and…

A: Introduction: Whether you need to utilise a USB flash drive for your personal computer or for…

Q: Unpacke

A: The binary coded decimal (BCD) is a kind of binary code used to address a given decimal number in an…

Q: What principles did computer pioneer Ada Lovelace develop?

A: The first computer programmer is thought to have been English mathematician Augusta Ada King,…

Knowledge Booster
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • Pakistan online Daraz company has four agent (1 to 4) who sell 5 different products ( 1 to5). Once per day, each agent passes in a slip for each different type of product sold. Every agentpasses in between 0 to 5 slips each day. Each slip has the following information on it: The agent number The product number Total rupees of that product sold that day.Write a program in C++ that will read all this information for last month’s sales and brief thetotal sales by agent by product. The output should be in tabular form.
    Complete the flowgarithm/pseudo code for the following scenario and upload into drop box Program Purpose -Professional Athletes often hire other professionals to help take care of matters for them. We will group them in four_______ categories: Lawyers, Personal Assistants, Agents, and Trainers. They all get paid a percentage of the athlete's total yearly salary. Lawyers - 10%, Personal Assistants - 3%, Agents - 7%, and Trainers - 5% .Prompt the user to enter the athlete’s salary for the year (ensure that the entered value is positive). The user should then enter the name and category of each of the hired professionals. The athlete should be able to hire at most 20 professionals in each category as he/she wants, even if it is more than he/she can afford. Based on the category, calculate the amount that each professional should be paid. After all data has been entered, print the names of each professional hired, how much each is being paid, the total amount the athlete paid, and how much…
    IN PYTHON PLEASE AND FLOWCHART DRAWING COMPUTERIZED PLEASE!!   In many businesses across the country, people are buying food and goods using cash. Whenever a purchase is made with cash, it is usual that change must be back to the customer. Business point of sales software help to ensure that the correct change is return to a customer by providing detailed information of the change that should be returned to the customer. using the fewest number of bills and coins. In this assignment, you are asked to design and implement a program that writes out what bills (ones, fives, tens, twenties) and coins (pennies, nickels, dimes, and quarters) that should be returned to the customer given two inputs from the user: A total cost of a sale. The amount that was paid by the customer. Ensure that your output is grammatically correct. If the customer does not provide adequate payment, you should print the following statement, the program should end. Did not receive enough cash from the customer.…
  • (Rounding Numbers) Function floor can be used to round a number to a specific decimal place. The statementy = floor(x * 10 + 0.5) / 10;rounds x to the tenths position (the first position to the right of the decimal point). The statementy                                        = floor(x * 100 + 0.5) / 100;rounds x to the hundredths position (the second position to the right of the decimal point). Write a program that defines fourfunctions to round a number x in various ways:A. roundToInteger(number)B. roundToTenths(number)C. roundToHundredths(number)D. roundToThousandths(number)For each value read, your program should print the original value, the number rounded to the nearest integer, the number rounded to the nearest tenth, the number rounded to the nearest hundredth and the number rounded to the nearest thousandth.
    Create a flowchart of the following problem:         The manager of a football stadium wants you to write a program that calculates the total ticket sales (number of tickets sold and the total sales amount) after  a game given that there are four types of tickets—box, sideline, premium, and general admission and the ticket prices are as follows:      Premium =  $250.00     Box =  $100.00      Sideline =  $50.00     General Admission = $25.00       The number of tickets sold for every ticket type must be inputted by the user. The Total Tickets Sales must be computed and outputted.   If the TOTAL TICKET SALES is higher than 3000, display the message " Great job !" otherwise display " We have to sell better next       time"         Sample Screen Output:        ______________________________________________             Input ticket Sold for Premium: 5       Input ticket Sold for Box: 10       Input ticket Sold for Sideline: 15       Input ticket Sold for General Admission: 20         The…
    Answer this question 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 / height2where 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
  • A company has 45 employers, 25 work as system developers (D) and (N) work as sales representer while (M) of them work as IT technicians. This company deals with 450 products. In the products table, each product has a name, price, size, and weight.  write code in python and Draw a flowchart on exel to find how many numbers of the products have a Small size(s), where there are 3 product sizes (S, M, L).
    The Barking Lot is a dog day care center. Design a flowchart or pseudocode for the following:   d. A program that continuously accepts dogs' data until a sentinel value is entered, and displays billing data for dogs that weigh less than 20 pounds or more than 100 pounds.
    A military academy accepts candidates according to the following height and weight requirements based upon their sex.  Sex             Min. Height          Max. Height          Min.Weight         Max. Weight  Male               65 in.                     80 in.                   130 lbs.              250 lbs.  Female           62 in.                     75 in.                   110 lbs.              185 lbs.   Design and implement a program in C++ that informs the user of the acceptance status of each candidateapplying based on the qualifications stated above. The user will input a group of candidates at a time. Foreach candidate, they will provide sex, height & weight (The sex should be read into a single charactervariable). Each of the input values should be error-checked. (See below for the minimum and maximumconstraints). For each candidate, the program will output whether each candidate was accepted, or rejected basedon height, weight, or height & weight. The user will…
    • SEE MORE QUESTIONS
    Recommended textbooks for you
  • C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning
    Programming Logic & Design Comprehensive
    Computer Science
    ISBN:9781337669405
    Author:FARRELL
    Publisher:Cengage
    C++ for Engineers and Scientists
    Computer Science
    ISBN:9781133187844
    Author:Bronson, Gary J.
    Publisher:Course Technology Ptr
  • Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
  • C++ Programming: From Problem Analysis to Program...
    Computer Science
    ISBN:9781337102087
    Author:D. S. Malik
    Publisher:Cengage Learning
    Programming Logic & Design Comprehensive
    Computer Science
    ISBN:9781337669405
    Author:FARRELL
    Publisher:Cengage
    C++ for Engineers and Scientists
    Computer Science
    ISBN:9781133187844
    Author:Bronson, Gary J.
    Publisher:Course Technology Ptr
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT