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
Instructions:Select the correct answer.
Dafna1 [17]
It would be a audio file -B.
8 0
3 years ago
Satırlar ve sütunların kesişmesiyle oluşan kutular aşağıdakilerden hangisidir
Kryger [21]

Answer:

Huh English please......

7 0
2 years ago
Can anybody answer this
shutvik [7]

Answer:

Its the last one, CSS and HTML are similar but like it says some prefer one over the other.

6 0
3 years ago
Read 2 more answers
Which of the following are agricultural industry clusters? Human population systems, computer technoloy biotechnology or food pr
kondor19780726 [428]

Biotechnology

Food Products and Processing Systems.

Further explanation

Career clusters help prepare learners with knowledge that they need to use towards achieving their career goals. One such career cluster is the Agriculture, Food, and Natural Resources career cluster which is divided into seven pathways. They include:

  • Food Products and Processing Systems.
  • Biotechnology Systems
  • Agribusiness Systems
  • Plant Systems
  • Animal Science
  • Environmental Service Systems
  • Natural Resource Systems

This brings us to our answers above. Those working in the Food Products and Processing Systems pathway are responsible in discovering new food sources and coming up with ways to process and store food set out by industry regulation. On the other hand, biotechnology systems deal with techniques that use science to solve problems concerning living organisms and anyone thinking about pursuing this pathway ought to demonstrate competence in the application of biotech in the context of Agriculture, Food, and Natural Resources.

Learn about Agriculture, Food, and Natural Resources career cluster

brainly.com/question/6457497

brainly.com/question/11364780

#LearnWithBrainly

7 0
3 years ago
The ____ data source class that reduce your need for accessing individual Data Provider class when you are connecting to an Acce
olasank [31]

Answer:

AccessDataSource

Explanation:

6 0
2 years ago
Other questions:
  • Header and Footer options are located in the _____ tab.
    7·1 answer
  • What cell phone technology is the most popular in the united states?
    8·2 answers
  • The chart shows changes in sea level from 1995 to 2013. According to the chart, sea levels rose at an average annual rate of 3.2
    6·2 answers
  • Describe the differences between program development and program execution, including the installed software required for develo
    5·1 answer
  • When you open a browser window, it open in a _____. <br> a. fieldb. folderc. menud. window?
    7·1 answer
  • Plz go sub 2 "Shyy096" he is a 11 y/o boy and makes music fortnite vids, it would rly help him if u subscribe cuz he only has 8.
    10·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    13·1 answer
  • HELPPPPP 20 POINTS CORRECT ANSWER GETS BRAINLIEST<br>sorry wrong amount of points ;-;
    13·2 answers
  • BRIANLIEST!!!!!!!!!!!!!!!!
    12·2 answers
  • The Backstage view is where you can see information and options pertaining to the user account and settings. How is the Backstag
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!