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
the function must find the substrings of s that start with a vowel and end with a consonant, then print the alphabetically first
PolarNik [594]

According to the parameters given in the questions above, the alphabetically lowest and highest substrings that start with a vowel and end with a Consonant is given below.

<h3>What is the determined substrings described above?</h3>

The determined substring is given by the following:

def findSubstrings(s):

   sub_strings_list=[]    #the required substrings list

   vowels=['a','e','i','o','u']    #vowels list

   for i in range(0,len(s)):    

       for j in range(i+1,len(s)+1):

           sub_string=s[i:j]    #slicing the original string into substring

           #checking whether the substring starts with a vowel and ends with a consonant

           if(sub_string[0] in vowels and sub_string[-1] not in vowels):    

               if(sub_string not in sub_strings_list):    #checking if the substring is already in the list

                   sub_strings_list.append(sub_string)    #if all conditions are satisfied adding the substring to the list

   sub_strings_list.sort()    #sorting the list alphabetically

   print(sub_strings_list[0])    #printing the first substring in the list

   print(sub_strings_list[-1])    #printing the last substring in the list

s=input()

findSubstrings(s)

Learn more about substrings:
brainly.com/question/21306076
#SPJ4

Full Question:

Consider a string, s — An alphabetically-ordered sequence Of Of s would be {"a", "ab•, "abc • , "bcu, If the sequence is reduced to only those substrings that start with a vowel and end with a consonant, the result is Cab", •abc"}. The alphabetically first element in this reduced list is •ab", and the alphabetically last element is "abc'. As a reminder:

Vowels: a, e, i, o, and u.

Consonants: b, c, d, f, g, h, i, k, l, m, n, p, q, r, s, t, v, w, x, y, and z.

For a given string, determine the alphabetically lowest and highest substrings that start with a vowel and end with a Consonant.

7 0
2 years ago
A modem is required for ________________ internet access.
irakobra [83]
Broadband I believe!
8 0
3 years ago
A student enters the names of months in cells A2 to A5 with the heading "Month" in cell A1. Then he enters the number of days in
Marrrta [24]
The answer is true because it solvers by Parameters
5 0
3 years ago
You are frustrated to find that the only way to contact the customer service department is to make a phone call. The number list
Mademuasel [1]

Answer:

Option A; MINING THE SOCIAL MEDIA INPUTS.

Explanation:

Customer relationship management (CRM) is an approach to manage a company's interaction with current and potential customers. It uses data analysis about customers' history with a company to improve business relationships with customers, specifically focusing on customer retention and ultimately driving sales growth.

Social media mining is the process of obtaining big data from user-generated content on social media sites and mobile apps in order to extract patterns, form conclusions about users, and act upon the information, often for the purpose of advertising to users or conducting research.

The number listed from phone call would result in long distance charges to your phone bill, therefore, the issue of MINING THE SOCIAL MEDIA INPUTS should be addressed by the company to keep its CRM in line with your expectations.

3 0
3 years ago
Select all the sets that are countably infinite. Question 3 options: the set of real numbers between 0.1 and 0.2 the set of all
timama [110]

Answer:

1.  the set of real numbers between 0.1 and 0.2

2. the set of all negative integers greater than negative 1 trillion

3.  the set of all java and C programs

Explanation:

A set is countable if it is either finite or has the same cardinality as the set of positive integers. The inverse of this set type is uncountable.

The set of real numbers between 0.1 and 0.2, all negative integers greater than negative 1 billion, and a set of java and C programs are all countable sets, so are considered countably infinite.

5 0
3 years ago
Other questions:
  • Need answers for 11&amp;12. Due today. Thanks.
    14·1 answer
  • What is a search engine and how is it different from a browser?
    6·1 answer
  • ________ reality is the addition of digital information directly into our reality, either to add more detail or to remove unwant
    7·1 answer
  • What does it mean to “declare a variable”? create a variable use a variable share a variable modify a variable
    11·2 answers
  • A digital native is a person who has been exposed to technology at a(n) ___________ and is comfortable using it.a. old ageb. sch
    14·1 answer
  • In the context of machine learning, an artificial neural network (ANN) is most likely used for:a.supplying explanations for solu
    9·1 answer
  • How do you create a IOS app?
    12·1 answer
  • There is a population of owls in a forest. In one year there are 20 new owls born and 10 owls die. In this same year, 5 owls ent
    14·1 answer
  • Question
    5·1 answer
  • What is the scope of AS-26
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!