answersLogoWhite

0

#include <iostream>

using namespace std;

int main()

{

double num1, num2, avg, sum;

//use double instead of int because int only recognize whole numbers

cout<<"Enter a number: ";

cin>>num1;

cout<<"Enter a number: ";

cin>>num2;

sum=num1+num2;

avg=sum/2

cout<<" The average is: "<<avg;

system("pause");

return 0;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

A program c plus plus on automorphic numbers or not?

how to write a program that counts automorphic number from 1 to 999


What is the average of 12.3 plus 6.4 plus 0.44?

6.38 is the average of the three numbers.


How do you write a C plus plus program that will display the first 10 positive prime numbers?

By learning how to program on C+.


What do you do when you have to find the average?

You add the numbers together that you are trying to find the average of and then you divide it by how many numbers there are.Exampleto find the average of 67, 5 and 21 you plus them all together67+5+21=93then you divide the answer by three because there are 3 different number93&divide;3= 31


What is the program to find sum of n natural numbers in c plus plus?

Initialise an unsigned integer to zero. As each number is input, increment the running total accordingly. When all numbers are input, display the total.


How many operations ( plus and and divide) to find the average of 10 numbers?

To find the mean average of 10 numbers requires the 10 number to be added together which will take 9 additions and then divide by the number of numbers which will take 1 division &rarr; 9 additions followed by 1 division, a total of 10 operations are nominally needed to find the mean average of 10 numbers.


How many operations ( plus and and divide) to find the average of 20 numbers?

To find the mean average of 20 numbers requires the 20 number to be added together which will take 19 additions and then divide by the number of numbers which will take 1 division &rarr; 19 additions followed by 1 division, a total of 20 operations are nominally needed to find the mean average of 20 numbers.


What is these numbers average 29.7 plus 48.9 plus 8?

Just add the numbers, and divide the result by 3 (since there are 3 numbers).


Write a C plus plus program to find out the square of first 10 numbers?

#include&lt;iostream&gt; int main() { int i=0; while(i++&lt;10) std::cout&lt;&lt;i*i&lt;&lt;std::endl; }


C plus plus program to find all even numbers between 100 and 150 using for loop?

#includeint main(){int i;for(i=2;i


Does average mean plus?

No. To find the average you:First, add up the numbers you have. For example, 2+4+6This equals 12.You then divide the 12 by how many numbers you started with.12 divided by 3 equals 4.


What is the mean of 70 plus 70 plus 70 plus 10 plus 10 plus 8 plus 4 plus 18 plus 5 plus 40?

The mean of a set of numbers is the average. That is to say, all the numbers added together and divided by the number of the numbers. the answer is 30.5