Write a program that includes a function picnic()

Assignment Help Basic Computer Science
Reference no: EM13952644

Write a program that includes a function PICNIC() that will accept a floating-point number TOTAL and the addresses of the interger variables HOTDOGS, HAMBURGERS,SALAD,PICKLES. The passed floating-point number represents the TOTAL amount of money to be spent on food. The function is to determine the quantity of HOTDOGS, HAMBURGERS,SALAD,PICKLES that can be purchaced, writing these values directly into the respective variables declared in the calling function.

This function will be called from the main program and when it returns to main, it will print out the values of HOTDOGS, HAMBURGERS,SALAD,PICKLES.

Our favorite foods are in this order:

1- hotdogs 1.00$ each

2- hamburgers .50$ each

3- salad .25$ each

4- pickles .01$ each

Example: if I enter the total amount of money of 3.78$, i can bring the following items to my picnic: 3 hotdogs, 1 hamburger, 1 salad, 3 pickles.

Reference no: EM13952644

Questions Cloud

Modify this pay calculator design : Modify this Pay Calculator design to include an input validation loop to ensure that the user provides a valid employee name (non empty); otherwise, the pay is not calculated
Who supports bigger government : In 2012, researchers at the Edelman Public Relation firm asked a representative sample of 1,000 people in the United States this question: "Do you think your government regulates business too much, not enough, or the right amount?"
Difference between vertical and horizontal information : Describe the difference between "vertical" and "horizontal" information? How is each used by the police, fire or EMS personnel? Give a real-life example for each!
What is the mass of an aspartame molecule : The artificial sweetener NutraSweet is a chemical called aspartame (C14 H18 N2 O5). What is its molecular mass (in atomic units)? What is the mass (in kg) of an aspartame molecule?
Write a program that includes a function picnic() : This function will be called from the main program and when it returns to main, it will print out the values of HOTDOGS, HAMBURGERS,SALAD,PICKLES.
Calculate number of atoms in a cubic centimeter of silicon : The density of particles n is a suspension is found to go as n=n0e-lamdah, where lamda is a constant and h is the height. What is the value of lamda if the density falls to no/2 When h = 10 microm?
Oregon adventures provides tours of scenic locations : Assume that sales for each quarter in 2012 will be 30 percent higher than they were in 2011 and the price per tour is $80.Prepare a sales budget by quarter for 2012.
Degree of a statically indeterminate structure : How to find out the degree of a statically indeterminate structure?
What conditions are the computed values inaccurate : Why can a harmonic function be used to compute vibrational energy states for a DIATOMIC molecule, and under what conditions are the computed values inaccurate?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd