1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dalvyx [7]
2 years ago
7

Write a function float Average(int, int) that finds the mean, and then write a main program that inputs two numbers from the use

r repeatedly until the user enter “0”. You need to call the function and display the mean of two numbers in the main. C++ language only.
Computers and Technology
1 answer:
meriva2 years ago
5 0

The program illustrates the use of functions.

Functions are used to group related code segments that act as one, when called.

The program in C++ where comments are used to explain each line is as follows:

#include <iostream>

using namespace std;

//This defines the Average function

float Average(int num1, int num2){

   //This returns the average of the numbers

   return (num1+num2)/2.0;

}

//The main method begins here

int main(){

   //This declares the numbers as integer

   int num1, num2;

   //This gets input for both numbers

   cin>>num1; cin>>num2;

   //This is repeated until the user enters 0

   while(num1!=0 || num2 !=0){

       //This calls the average function, and prints the average

       cout<<Average(num1,num2)<<'\n';

       //This gets input for both numbers, again

       cin>>num1; cin>>num2;

   }

   return 0;

}

Read more about similar programs at:

brainly.com/question/17378192

You might be interested in
How to get an object from a container in java.
Vinil7 [7]
If it stores any type of objects mixed, use Object as storage class. All classes inherit from Object and for primitives use their respective wrapper classes. Or just use one of the bazillion container classes that already exist.
3 0
3 years ago
What are the examples of computer software​
jonny [76]

Answer:

Examples of modern applications include office suites, graphics software, databases and database management programs, web browsers, word processors, software development tools, image editors and communication platforms. System software. These software programs are designed to run a computer's application programs and hardware.

Explanation:

Hope this helps :)

Have an amazing day <3

Pls mark brainliest :p

3 0
3 years ago
Read 2 more answers
Explain the working principle of computer? can anyone tell​
Crazy boy [7]

Answer:

input process and output hehe

4 0
3 years ago
What term identifies a blank screen or animation that automatically displays on a computer monitor after a specified period of i
Sveta_85 [38]
The answer is a screensaver
5 0
3 years ago
Range of motion definition
svet-max [94.6K]
Range of Motion:
Range of Motion or ROM is an exercise machine when a person has been injured in some way, most times the doctor's advises the patients to exercise and stretch the back back muscles. 
<span />
7 0
3 years ago
Other questions:
  • When does a kernel panic occur?
    12·2 answers
  • Which LOOKUP function will you use if you want to search for a value in the columns?
    5·1 answer
  • A network engineer arrives at work and discovers that many users are having problems when attempting to connect to the company n
    9·2 answers
  • Select the guidelines you should follow when creating a resume
    12·2 answers
  • Define an organizational unit in your own words.
    11·1 answer
  • Using this tool to help you to visualize your slides and develop your content
    13·1 answer
  • True or False: Mapping annotations are exclusive - an annotated method will only be accessible to requests sent to a matching UR
    14·1 answer
  • Keely has an automation tool in place that runs a number of different processes for her and has for the last two years. All of a
    8·1 answer
  • 3.<br>What is the meaning of *.VBP.<br>​
    6·2 answers
  • Select the correct answer from each drop-down menu,
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!