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
Finish the sentence. If the IP address and MAC address are parameters of layer 3 and layer 2, respectively, a port number is a p
stepan [7]

Answer:

Layer 4

Explanation:

MAC address works at the data link layer (layer 2) of the OSI model. Mac address allows computers to uniquely identify themselves in the network

IP Address is a logical address that works at the network layer of OSI model (layer 3) (actually the IP layer of TCP/IP model).

The port number works at the transport layer of the OSI model (layer 4).The port number uses sequence number to send segments to the correct application thereby ensuring they arrive in the correct order.

7 0
3 years ago
You are unpacking and setting up workstations
Anestetic [448]

Answer:

For setting up workstations in classrooms, one end of cables connected into the built in NIC and other end will be connected to a drop.

Explanation:

A drop will be used for connectivity in this case, which will work as connection point in a network. Drops are just like outlets in wall having  Ethernet Jacks where a network device or system can be plugged into it.

8 0
3 years ago
With consideration to Ethernet, why is it necessary to have a common language for communication across devices
Travka [436]

Yes the ansewer is c bc you can look it up!

3 0
3 years ago
How do you know when a spreadsheet object is active in a powerpoint presentation?
Ira Lisetskai [31]
It should be under lined, when you press it it should have a different colour
4 0
4 years ago
The PRODUCT table contains this column: PRICE NUMBER(7,2)
Anna35 [415]

SQL queries are used to return results from a database table or multiple tables.

If the PRICE column contains null values, then (b) the statement would fail because values cannot be divided by 0.

The query is given as: SELECT NVL(10 / price, '0')  FROM PRODUCT

From the query, the query is to first divide 10 by the value of the PRICE column.

If the PRICE column contains 0, then it means that price = 0

A division by 0 is not possible.

So, the query would fail

Hence, the true statement is (b)

Read more about SQL queries at:

brainly.com/question/15049854

7 0
2 years ago
Other questions:
  • Pedestrians, cyclists, horse drawn vehicles and wheel chair users are known as ___________
    6·2 answers
  • ________ and wpa are wireless security protocols which use encryption to secure wi_fi networks.
    12·1 answer
  • Which of the following describes a poor design consideration for a form?
    14·1 answer
  • Circular errors are caused by adding the cell name of a/an _______ cell to a formula.
    11·2 answers
  • Assume that x is a variable that has been declared as an int and been given a value. Assume that twice is a method (in the same
    11·1 answer
  • PLEASE HURRY!!!!!!!!!! WILL MARK BRAINLIEST!!
    13·1 answer
  • Hi Alaza, when you submit this form, the owner will be able to see
    12·1 answer
  • On a scale of 1-10 how would you rate your pain
    12·1 answer
  • Reports produced by the United Nations are considered
    11·2 answers
  • A technician is about to open a desktop PC to replace a video card. He shuts down the computer, opens it, grounds himself with t
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!