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
Hulu suggestions? I just got it and I wanna know what's good :)
o-na [289]
Anime show: naruto

Drama show: sweet Mongolian

Adventure show: outer banks
6 0
3 years ago
Read 2 more answers
What does using indirect quotations allow a writer to do?
Marrrta [24]
Indirect quotations can add information that strengthens your content in many of the same ways as direct quotations so. Essentially, indirect quotes carry the meaning of a speaker or writer's original words without using the exact words.
7 0
3 years ago
Read 2 more answers
You are the system administrator for a medium-sized Active Directory domain. Currently, the environment supports many different
Bogdan [553]

Answer:

All the Above

Explanation:

Domain local groups, global Groups, Universal Security Groups all these 3 groups can be used.

7 0
3 years ago
A technician configures a switch with these commands:SwitchA(config)# interface vlan 1 SwitchA(config-if)# ip address 192.168.1.
yanalaym [24]

Answer:

SVI (Switched Virtual Interface)

Explanation:

For a switch to have an IP address, a switch virtual interface must be configured. This allows the switch to be managed remotely over the network.

5 0
3 years ago
You receive an offer for a credit card that can be use to accrue points that
Jlenok [28]

Answer: (C) A special service for current customers

Explanation:

  The CRM is the customer relationship management that typically use by the banks for providing special type of services to the current customer. This is the way to attract various types of users or customers by providing some special type of offers.

According to the question, bank provide the credit card offers to the customer on the airline tickets so, it is beneficial for both the customer and for the bank as well.

3 0
3 years ago
Other questions:
  • Which of these jobs would be most appropriate for someone who majors in computer engineering? I need the answer ASAP Helping com
    14·2 answers
  • The next generation ip version and successor to ipv4 is called what? ipv5 ipv6 iana ssl
    13·1 answer
  • When you tell a computer what to do, you are providing input?
    11·1 answer
  • __________________ ensures that each row is uniquely identified by the primary key, which means that a proper search for an exis
    10·1 answer
  • Exploring Arraylists. Remember that arraylists are good for adding and removing things, and that they are clock-cycle friendlier
    13·1 answer
  • Rewritable (write, erase, write again) is known as _______.
    7·1 answer
  • Pls help now the question is very hard someone help me pls​
    6·1 answer
  • Laptop computers use PCMCIA cards, another type of ________
    15·1 answer
  • Do you think it's easier to be mean online than offline? why?
    14·1 answer
  • Choose the response that best completes the following statement.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!