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
Can include the 5-tuple information, which is the source and destination ip addresses, source and destination ports, protocols i
Delicious77 [7]

<span>The answer is Firewall Log.  The </span>Logging tab is a tabled, real-time and up-to-date integration of the traffic logs generated by the Firewall. It will show all the connections that have been active on your computer.  <span>You can also use the Windows Firewall log file to monitor TCP and UDP connections and packets that are blocked by the firewall.</span>

7 0
3 years ago
What is the impedance mismatch problem? Which of the three programming
kykrilka [37]

Answer:

The problem that created due to the difference in the model of programming language and the database model.

Explanation:

The practical relational model has three components which are as follows

1. Attributes

2. Datatypes

3. Tuples

To minimize this problem  

1. We switch low pass L-Network to high pass L-network

2. We switch high pass L-Network to low pass L-network

3. We use the impedence matching transformer

3 0
3 years ago
Question 6 [10 marks] a) How does a company's use of information systems affect its corporate strategies? (7 marks) b) Provide a
Alja [10]

Answer:

following are the responses to the given question.

Explanation:

The capability to successfully utilize IT is mutually dependent on its ability to execute strategic strategy and set business goals. The ability to compete more and more relies on the capacity of an organization of using technology. In the future, what a company wants to do will rely on what its technologies can do. It may be an example of a company investing in information technology that allows a company to manufacture new products or improve the efficiency of the distribution system to the corporation's economic efficiency.

5 0
3 years ago
Which of these are branches of anthropology?
Lesechka [4]

The answer to "Which of these are branches of anthropology" is C... All of the above.

6 0
3 years ago
Read 2 more answers
How do i enter this as a formula into excel IF function?
julsineya [31]

Answer:

Call microsoft

Explanation:

Exel Is My Worst Nightmare Just Call Microsoft "I'd Hope They'd Have A Answer For That"

6 0
3 years ago
Other questions:
  • The operation of the waste spark Ignition system is being discussed. technician a says that the spark that occurs on the exhaust
    14·1 answer
  • If you are driving at night, you should not use high-beam headlights within _________ of oncoming vehicles. Florida Road Rules 4
    9·2 answers
  • A _____ is a unique name that identifies an Internet site. URL Browser AOL IA
    13·1 answer
  • How do you think computers have helped improve documentation, support and services within the healthcare industry
    13·1 answer
  • Is amazon a e-commerce website <br> o true <br> o false
    8·2 answers
  • Edhesive 7.6 lesson practice python
    11·1 answer
  • Computer is a major source of informarion why​
    8·1 answer
  • I came here for a answer so why did i get a pep talk
    7·2 answers
  • computer have taken over a lot of boring, repetitive and time consuming as well as dangerous jobs.true or false
    7·1 answer
  • Range paramters - for loop<br> question in picture
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!