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
Conduct a site research on a specific property using the concepts discussed during this week.
Anni [7]

Answer:Penis!

Explanation:

Haha! Enjoy your day! Hahahahaha!

8 0
2 years ago
Who plays Roblox and wants to be friends on it
qaws [65]
I have roblox and I would like to be friends on it
4 0
2 years ago
Read 2 more answers
How do you fix this windows 7 screen​
tensa zangetsu [6.8K]

Try restarting it. If you can’t restart because the screen is frozen maybe just turn it off and back on. If you already tried restarting and it still didn’t fix the problem, just give it some time. The computer will reset itself eventually which should fix the problem.

6 0
3 years ago
Electronic transmission of information standards, such as transaction and code sets and uniform identifiers, are covered underQu
Mila [183]

Answer:

option A

Explanation:

Option A.

With the use of Administrative simplification, we can transform all the paper work to electronic media such as electronic receipts or electronic mail. By shifting towards electronic means in Administrative simplification we are actually saving a lot of time by helping the human resource and from the laborious tasks of paper work and data management.

The management of electronic means is very easy and friendly, it is also a reason for implementing administration simplification as well.

3 0
3 years ago
____ is the security guarantee that people who intercept messages cannot read them. A. Availability B. Encryption C. Confidentia
Anni [7]

Answer:

C. Confidentiality

Explanation:

With confidentiality, a person who intercepts messages you intend to remain private cannot read them and thus increases your document protection

8 0
3 years ago
Other questions:
  • "what is the name of the ipsec configuration file"
    9·1 answer
  • why is it important to use a general search engine, like GOOGLE, to look up the name of the organization, institution, agency or
    7·1 answer
  • How to write a program converting RGB to CMYK in python
    6·1 answer
  • What is my credit card billing zip code??
    15·1 answer
  • What are some good job skills?
    12·1 answer
  • Convert 78 to binary
    6·2 answers
  • An ____ is a collection of tools, features, and interfaces that enables users to add, update, manage, access, and analyze the co
    10·1 answer
  • A disk takes 1 ms per track seek time, and the head is currently on track 70. Assume it takes 5 ms to service a request once the
    10·1 answer
  • Write a program that prompts the user to enter a number then counts the number of odd numbers and even numbers the user enter. T
    15·1 answer
  • Write a function check_palindrome that takes a string as an input and within that function determines whether the input string i
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!