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
Which of the following inputs help robotic vacuum cleaners maneuver around obstacles?
Alja [10]

Answer:

c lasers and sensors

Explanation:

7 0
3 years ago
Read 2 more answers
My friend has a battery of 9000mah and loses 10 every day how many days well it take to go to zero
forsale [732]
I think it's 900 but I can't be sure.
8 0
3 years ago
Explain the role of ICT in banks​
vladimir1956 [14]

Answer: ICT help banks improve the efficiency and effectiveness of services offered to customers, and enhances business processes, managerial decision making, and workgroup collaborations, which strengthens their competitive positions in rapidly changing and emerging economies.

Explanation: please give branliest I only need one more to make ace

7 0
3 years ago
If you omit the filename from a URL, the Apache web server displays a list of files and directories if the specified directory d
g100num [7]

Answer:

Default File

Explanation:

When a website is visited from a web browser without the explicit specification of the complete path of the file with the URL, the webserver will look for the file named index.html or index.php from the public_html files and render the contents of the file.

The name index. html or index.php is commonly used for the default page which is the page displayed to a visitor that does not specify a particular page for example (mysite/contact_us), so if the file path "contact_us" is omitted, the visitor will be taken to the "index" also known as the home page of "mysite".

6 0
3 years ago
Based on a kc value of 0.150 and the data table given, what are the equilibrium concentrations of xy, x, and y, respectively?
lidiya [134]

If the solution process is endothermic, then an increase in temperature usually results in an increase in solubility. Their heat of reaction is usually positive. The rest of the choices do not answer the question above.

4 0
3 years ago
Other questions:
  • Having network users login with a username and password is an example of:
    12·1 answer
  • Helena purchased a security software package to protect her new laptop against threats such as spyware and computer viruses. she
    14·1 answer
  • Which of the following Office Online apps is most effective for creating spreadsheets?
    14·2 answers
  • The feedforward part of the conversation should do all of the following except __________.a.identify the toneb.introduce the pur
    11·1 answer
  • To prevent injury when pulling a nail be sure the material holding the nail is
    14·1 answer
  • For C programming language, what does it mean when you have an exclamation mark after an equal sign? ie:
    5·1 answer
  • How can I unblock Brainly?
    12·2 answers
  • Function of an actuator
    8·2 answers
  • The television is the biggest technological advancement in communication since the telephone.
    6·2 answers
  • A blueprint or a "print" needs to
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!