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 survey of results on mobile phone datasets analysis
xxMikexx [17]
PErfect! 100% Absolutely beautiful. 
6 0
3 years ago
What subsection of the Internet requires specialized browser to access and is frequently used by cyber criminals and underground
kotykmax [81]

Answer:

c. Dark Web                                                

Explanation:

Surface web is also called visible web is a part of world wide web that can be easily searchable using search engines as its contents are indexed by the search engines such as Google and its contents are accessible by public using standard web browsers. So a is not a suitable choice.

Deep Web is called invisible web as it is not accessible or searchable to standard search engines like Google. Search engines cannot index the contents of these sites. However such sites do not requires specialized browsers to access. So b is not a suitable choice.

Dark Web: It is a part of Deep Web sites but it requires specialized software and browsers to access. These sites cannot be indexed and cannot be searchable through standard search engines. This is also called dark side of the world wide web darker which is frequently used by criminals, hackers, black markets, hit-men. Illegal activities on a massive level is takes place in the dark web such as access to stolen sensitive information, malware, drug trade and terrorist operations. These sites are temporary and keep changing addresses to lessen the risk of getting caught by govt agencies or security officials. So c is the suitable choice.

Crypto-Net is a kind of neural network which works with encrypted data which can make a prediction based on the data without disclosing the data and prediction to the 3rd party. So d is not a suitable option.

6 0
2 years ago
The correct order of operations is _____. brackets, exponents, division, multiplication, addition, and subtraction subtraction,
bija089 [108]

brackets, exponents, division, multiplication, addition, and subtraction

6 0
3 years ago
Read 2 more answers
Select all that apply.
rosijanka [135]

Answer:

don't overuse special effects, match special effects to content, use consistent transitions for each slide

Explanation:

I found this on quizlet.

6 0
2 years ago
Write a program that accepts two integers from the user and perform one of the four arithmetic operations based on user’s choice
alex41 [277]

Answer:

do you still need the answer? or am i to lateeee

Explanation:

6 0
2 years ago
Other questions:
  • Write a function named shareALetter that takes one parameter, wordList – a list of words. Create and return a dictionary in whic
    13·1 answer
  • When the tcp\ip translates a network layer address into a data link layer address (after not finding an entry for the network la
    13·1 answer
  • What does limited access to a document mean?
    14·2 answers
  • Which term refers to a type of an attack in which an attacker makes his data look like it is coming from a different source addr
    10·1 answer
  • What is a directed graph?
    5·1 answer
  • Good ways to increase sales on phone accesories?
    10·2 answers
  • Memory cache is referred to as ______. A. SRAM c. SROM b. DRAM d. DROM
    11·1 answer
  • Which These operating systems use a graphical user interface?
    6·1 answer
  • What is the right age to start coding in high school?
    11·1 answer
  • Leslie works in an SDLC team. When Leslie edits a file, it gets saved as an altered version. Later all the altered versions are
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!