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

29. Write a program that asks to input any ten numbers and displays sum of them​

Computers and Technology
1 answer:
pogonyaev3 years ago
5 0

Answer:

Here is the code for a classic C++ program that does it:

--------------------------------------------------------------------------------

#include <iostream>

using namespace std;

int main()

{

   int sum = 0;

   int n;

   cout << "Input 10 numbers: " << endl;

   for (int i = 0; i < 10; i++)

   {

       cin >> n;

       sum += n;

   }

   cout << "Sum of the numbers: " << sum << endl;

}

--------------------------------------------------------------------------------

Explanation:

I'm assuming you know what "include", "using namespace std" and "int main()" do, so I will skip over those.

First, we declare a variable "sum" and initialize it with 0 so we can add numbers to it later.

Then, we declare a variable "n" that will be set as the input of the user.

The "for-loop" will iterate ( go ) from 0 to 9, and will set the value of "n" as the input that is given -> "cin >> n;". After that, we add the value of "n" to the sum variable.

After "i" reaches 9, it will exit the loop and proceed to printing the sum of the numbers.

Hope it helped!

You might be interested in
A large institution, such as a bank, may have thousands of transactions to process in which no user interaction is required; whi
White raven [17]

Answer:

Mainframe Computer System

Explanation:

Mainframe systems or simply mainframes are computers used for critical application, bulk processing and transaction processing.

They are larger than the basic computers we find around. They are advantageous as they are able to process large data faster. For this reason, large institutions like banks tend to use them for processing of data because of the thousands of transactions they engage in.

They are capable of handling and processing very large amount of data quickly.

Examples of other large institutions that uses mainframe computers apart from Bank stated in the question are

1. Stock brokerage firms

2. Government agencies

3. Insurance agencies

4. Fortune 500 companies and so on.

6 0
3 years ago
Read 2 more answers
Alex has composed a layout with this Image for a magazine. Which rule of composition has Alex applied?
Genrish500 [490]

Answer:

Golden Ratio

Explanation:

7 0
3 years ago
PLEASE HELP THIS IS CONFUSING ME
Artemon [7]

Answer:

The answer is:

Yes, because Antonio clearly copied someone else's words.

Explanation:

It is still forbidden to plagiarize Wikipedia despite it being a Open-Source Data base of information. This means, unless you directly cite in a bibliography or with in-text citations, the article, the author, and everything else needed in the proper citations for the format, it is plagiarism.

3 0
3 years ago
Read 2 more answers
Question 2 (2 points)
swat32

I beleive all of the above for question one

4 0
3 years ago
what new technology led to the chaos that spurred the establishment of the federal communications commission?
adelina 88 [10]

Answer:

The digital read Harry quaant

3 0
1 year ago
Other questions:
  • Custom parameters 1, 2 and 3 provide the same end value for all keywords. true or false?
    14·1 answer
  • 850 cal into joules​
    13·1 answer
  • Write and run a Python program that asks the user for a temperature in Celsius and converts and outputs the temperature in Fahre
    10·1 answer
  • In this website/app what are the points for?
    7·1 answer
  • The main advantage of a solid state drive is:
    5·1 answer
  • What is the best way to protect against the loss of important files
    15·1 answer
  • Fill in each blank with the correct step from the fetch-execute cycle.
    14·1 answer
  • How do I keep my computer and data safe and secure while using the Internet?
    14·2 answers
  • Can someone please help me to point out what's wrong with this C program:
    13·1 answer
  • In Windows, what does the device manager tell you?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!