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]
3 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]3 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
Most presentations use text: A. To maximize area and style. B. At a minimum. C. To draw attention to content. D. Without restrai
klemol [59]

The answer is most likely A.


Hope this Helped!


;D

4 0
3 years ago
Read 2 more answers
A block style business letter is
Molodets [167]

Answer:

Block style is a special style or format that is adopted to write Business Letters.

Explanation:

We all know that for writing Business Letters a formal style is adopted in order to convey important information regarding business matters.

So by following Block Style in the Business Letters we mean to write the letter according to the rules below:

Text for the letter should be justified Left completely.

Single spacing should be used for text.

Double spacing should be used for paragraphs.

1 inch margin should be left on each side.

Built-in Letter Wizard for formatting can also be used while dealing with BLOCK STYLE FOR BUSINESS LETTERS.

I hope it will help you!

7 0
3 years ago
The use of IDPS sensors and analysis systems can be quite complex. One very common approach is to use an open source software pr
lawyer [7]

Answer:

IDP sensors can be complicated.An open-source software program called snort program.

Explanation:

Snort is an open-source network intrusion detection system (IDS) and prevention system. It is created in 1998 by Martin. Snort's open source network-based can perform analysis and packet logging on an Internet Protocol network.

The snort program can be used to detect probes or attacks. Snort configured three modes

sniffer

pocket logger

network intrusion detection.

6 0
3 years ago
Read 2 more answers
What mode is generally used when delivering a presentation to an audience?
dybincka [34]

Answer:

delivery mode

Explanation:

there it is

7 0
3 years ago
Read 2 more answers
Robert is leading a project online that includes students from different cultures. Two of the students spend most of the time li
enyata [817]

Answer:

A & C

Explanation:

8 0
3 years ago
Other questions:
  • Can you help me correct a sentence?
    13·1 answer
  • HELP AS SOON IS A UNIT TEST WILL GIVE BRAINLIEST
    9·2 answers
  • HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
    5·1 answer
  • O novo funcionário da equipe de desenvolvimento de sistemas está aprendendo os termos mais utilizados no dia a dia da empresa. A
    7·1 answer
  • How is the EF​ computed? A. ES​ + Activity time B. LF minusActivity time C. ​Min{LS of all immediate following​ activities} D. ​
    11·1 answer
  • An organization is building a new customer services team, and the manager needs to keep the tream focused on customer issues and
    13·1 answer
  • Create the Following Menu in a loop so the menu will continually show until the user chooses to exit.AddMultiplyExitAdd a value
    10·1 answer
  • Discuss the pros and cons of tombstoning versus multitasking. Why do you think Microsoft chose tombstoning?
    11·1 answer
  • If you're unsure if something
    9·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!