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
Dennis_Churaev [7]
4 years ago
11

Write a program which asks the user to enter N numbers. The program will print out their average. Try your program with the foll

owing numbers: 20.5, 19.7, 21.3, 18.6 and 22.1
Computers and Technology
1 answer:
Likurg_2 [28]4 years ago
7 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

   // variables

int n;

double average,sum=0,x;

cout<<"enter the Value of N:";

// read the value of N

cin>>n;

cout<<"enter "<<n<<" Numbers:";

// read n Numbers

for(int a=0;a<n;a++)

{

   cin>>x;

   // calculate total sum of all numbers

   sum=sum+x;

}

// calculate average

average=sum/n;

// print average

cout<<"average of "<<n<<" Numbers is: "<<average<<endl;

return 0;

}

Explanation:

Read the total number from user i.e "n".Then read "n" numbers from user with for loop and sum them all.Find there average by dividing the sum with n.And print the average.

Output:

enter the Value of N:5

enter 5 Numbers:20.5 19.7 21.3 18.6 22.1

average of 5 Numbers is: 20.44

You might be interested in
12. Which of the following is CourseBit®? (1 point)
Annette [7]
<span>12. Which of the following is CourseBit®? 
</span><span>a leading Moodle™ development and hosting provider that focuses on highly customized systems
</span>
<span>13. In Blender®, which interface principle corresponds to the user interface that allows a user to view all options and tools at a glance with pushing or dragging editors around?
non-overlapping

Hope this helps.</span>
4 0
3 years ago
You would like to search for information about storms but not tornadoes. What type of search strategy may be useful?
Norma-Jean [14]

Answer:

boolean search

Explanation:

4 0
3 years ago
Read 2 more answers
A keyboard shortcut to pasting in a document is to key _____.
m_a_m_a [10]
(Ctrl + V) is the shortcut for pasting.

Similarly, (Ctrl + C) is the shortcut for copying.
6 0
3 years ago
Install hardware, install software, and convert data are the three steps found in the _____. Select one:
aev [14]

Answer:b)Conversion plan.

Explanation:Conversion plan is type of plan in which the the technique is followed by converting the data from the present system to another system's hardware and software surroundings.

The technique follows three basic steps in the conversion plan is software installation plan, hardware installation plan and conversion of data. Thus the correct option is option(b).

3 0
4 years ago
What is the technique used to divide information sets into mutually exclusive groups such that the members of each group are as
mars1129 [50]

Answer:

C. Cluster analysis

Explanation:

<em>Cluster analysis </em>or clustering is the task of grouping a set of objects in such a way that objects in the same group are more similar to each other than to those in other groups.

This statistical method is used to group similar objects into respective categories by <em>identifying trends and patterns</em>.

Cluster analysis is typically used in the <em>exploratory phase of research </em>when the researcher does not have any per-conceived hypotheses. It is commonly not the only statistical method used, but rather is done in the early stages of a project to help guide the rest of the analysis.

5 0
3 years ago
Other questions:
  • Which of the following represent typical account fees?
    7·1 answer
  • 1. Customizable diagrams, including List, Process, and Cycle diagrams, are built into Word and can be found in
    15·2 answers
  • Hello... does anyone know why Brainly notifications aren’t working???
    11·2 answers
  • What is one reason the SOC categorizes occupations as it does?
    9·1 answer
  • A student dissolves some solid sodium hydroxide in a beaker of water.
    5·2 answers
  • Bushman and bonacci (2004) found that prejudiced participants were ____ likely to return a lost e-mail that had been addressed t
    5·1 answer
  • When would you use a template when working with word 2013?
    15·1 answer
  • Use the line of code below to choose the correct answer
    10·2 answers
  • Write ONE SQL statement for each of the following tasks. Note that you can only use conditions specified in the task description
    5·1 answer
  • Is it bad to leave your laptop plugged in all the time
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!