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 would you like your social media profiles/personas to be treated in the event of your death? why?
White raven [17]
Depends on the person really. personally i would like it all to be kept for memories but never used anymore
7 0
3 years ago
Read 2 more answers
what are some examples of security goals that you may have for an organization? check all that apply.
ExtremeBDS [4]

An examples of security goals that you may have for an organization is:  

  • To protect customer data against unauthorized access.

<h3>What is customer credentials about?</h3>

The goal of a firm in terms of security is to Safeguards or Defend customer credentials or details.

Therefore, An examples of security goals that you may have for an organization is:  

  • To protect customer data against unauthorized access.

Learn more about security goals from

brainly.com/question/14139033

#SPJ11

6 0
2 years ago
Do the pros of interpersonal communication via social media outweigh the cons? Explain.
JulijaS [17]
Well in my opinion is that yes they do. The ability to be able to communicate with others so far way really helps society advance towards the future. And i cant stress of how the benefits of being able to share ideas with well anyone is so wonderful.

I hope this helps.
6 0
3 years ago
Read 2 more answers
What term describes a wireless network topology in which access points work as peer devices on the same network?
kumpel [21]
Mesh WLAN wireless mesh network WMN describes a wireless network topology in  access points work as peer devices on the same network.
<span />
7 0
3 years ago
Explains your analysis of the impacts of this new internet distribution on people and businesses.
Anika [276]

Answer:

A business' ability to communicate with its employees, customers and associates changed dramatically when the Internet yielded new communication tools. Email and instant messaging have changed the face of business communication.

8 0
2 years ago
Other questions:
  • In a word processing program, the ribbon or menus contain the
    12·1 answer
  • If a = 3 and b = a+3 find value of b.
    14·2 answers
  • Which tool relies on the logged on user's certificate details to encrypt or decrypt files and folders? powershell bitlocker encr
    12·1 answer
  • Discuss the software development methodology you would use for developing a software product for insurance agents, and state val
    10·1 answer
  • Write an expression that evaluates to true if the value of the string variable s1 is greater than the value of string variable s
    7·1 answer
  • For your biology class, you will be giving a presentation of the findings of a plant growth experiment. Which application is bes
    7·1 answer
  • How to do “Pseudocode” and “FlowChart” in this question ? <br><br> Please Help mee
    9·1 answer
  • A(an)_______is built-in preset calculation. <br>formula <br> function <br>equation <br>AutoSum​
    12·1 answer
  • What rpm command can be used to list the full paths for files within the bash package?
    10·1 answer
  • What is the minimum amount of hard drive space required for a 64-bit Windows 10 installation?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!