Update the variables belonging to the main program

Assignment Help Basic Computer Science
Reference no: EM13666527

Write a program using functions where a function collects 8 numbers from the user, finds the largest, smallest of those 8 numbers and uses passing by reference to update the variables belonging to the main program.

Then the main program calls a function called CollectNumbers() and passes the variables largest, smallest BYREF(by reference). The CollectNumbers() return the average back to the main.

Here is what the functions should accomplish.

'main program.
Creates variables largest, smallest, average.
Calls CollectNumbers() function and sends variables largest, smallest BYREF(by reference)
The CollectNumbers() function should return the average.
The main displays the average returned by the function and , smallest and largest variables updated by the function.

Function CollectNumbers() receives largest and smallest by reference.
The purpose of this function is to take 8 numbers from the user.
Find the largest, smallest and the average of those numbers.
The function puts the largest of the 8 numbers in received parameter largest and the smallest of those 8 numbers in the received parameter smallest.
Then, Send the average back to the main.

Reference no: EM13666527

Questions Cloud

Find what is the balls acceleration at its highest point : A tennis player hits a ball at ground level, giving it an initial velocity of 26.0 m/s at 54.0 degree above the horizontal. Find what is the ball's acceleration at its highest point
Find how far horizontally does the rock travel : A balloon carrying a basket is descending at a constant velocity of 20.0 m/s. Find how far horizontally does the rock travel before it hits the ground
Compare and contrast distance-vector and link state routing : Compare and contrast distance-vector and link state routing
Compute the reaction force to the force : Assume you seated on a wheeled desk chair at your desk. Consider friction forces between the floor and the chair to be negligible. Compute the reaction force to the force that caused your acceleration
Update the variables belonging to the main program : Write a program using functions where a function collects 8 numbers from the user, finds the largest, smallest of those 8 numbers and uses passing by reference to update the variables belonging to the main program.
Obtain the final temperature of the watermelon and soda : A cooler contains 12 cans of soda at 5oC. Each soda has mass 0.35 kilogram and a specific heat capacity of 3800J/kgC. find the final temperature of the watermelon and soda
Compute the force acting on the sled : A sled with mass 8.00 kilogram moves in a straight line on a frictionless horizontal surface. Use the work-energy theorem to compute the force acting on the sled
Determine how far the book moves from its initial position : A 2.50 kg textbook is forced against a horizontal spring of negligible mass and force constant 250 N/m, determine how far the book moves from its initial position before coming to a rest
Designing a star schema : Designing a Star Schema

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