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

  Assignment on the new frontier-data analytics

In this highly competitive business environment, businesses are constantly seeking ways to gain traction and understand what is on the minds of current customers and potential customers in order to increase business efficiency. Many companies have..

  Produce a diagram of a proposed network

Produce a diagram of a proposed network

  A contractor speaking to a potential client

1) How would you, as a contractor speaking to a potential client, handle this situation? Often times you can explain something to someone and they still not really understand. When a potential client asks a question such as this, they want to underst..

  Explain the term omniscience

Explain the term omniscience Explain the importance of autonomy in an agent Develop the task environment for an interactive language tutor

  The components of a traditional analysis model

The components of a traditional analysis model

  Find the value of (((a+b+)+c)+d)

find the value of (((a+b+)+c)+d) that would be computed in a floating point number system that has a mantissa approximately equivalent in precisions to 17 decimal digits. a = 99.0, b = 1.0*10^30, c=1.0*10^30, d = -98.0

  Benefits and drawbacks of each format for users

Examine the benefits and drawbacks of each format for users. Determine whether you agree or disagree that Blu-ray was the superior choice technologically over HD-DVD. Provide a rationale for your response.

  Why are multiple levels of cache needed in computer

Modern CPU chips have one, two, or even three levels of cache on chip. Why are multiple levels of cache needed? Suppose that a CPU has a level 1 cache and a level 2 cache, with access times of 1 nsec and 2 nsec, respectively.

  Calculate the amount of product expected from a reaction

Write a Matlab program to calculate the amount of product expected from a reaction

  Resilience systems without disturbing normal businesd

With an increasingly global economy when business is open 24 / 7, how do we test the resilience of our computer systems without disturbing normal business operations?

  Describes the ideal information security system

Write a 1500 to 1750 word paper that describes the ideal information security system plan for one of the following organization types: hospital, bank, manufacturer, online wholesale enterprise, department store, state revenue agency.

  What are the practical benefits

What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. import java.net.* versus import java.net.Socket)?

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