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
Ups developed software called ____ to enable u.s. customs and border protection agents to inspect packages that pass through the
LekaFEV [45]

Ups developed software called <u>target search</u> to enable u.s. customs and border protection agents to inspect packages that pass through the worldport international hub in louisville.

An American international shipping, receiving, and supply chain management corporation, United Parcel Service, was established in 1907. The American Messenger Firm, which first specialized in telegraphs, evolved into UPS, one of the biggest shipping couriers in the world and a Fortune 500 company.

Today, UPS is most well-known for its ground delivery services and the UPS Store, a retail network that helps UPS packages and offers equipment for small businesses.

Learn more about UPS brainly.com/question/27583268

#SPJ4

8 0
1 year ago
My speaker on my phone is not working, when I try and play music and videos the sound dosen't work. However my alarm works. Can
SVEN [57.7K]
Try turning off your phone or resetting it
7 0
3 years ago
Read 2 more answers
Which statement best explains the way that similar apps are used in different devices?
monitta

The statement that  best explains the way that similar applications are used in different devices is option b:  Although the systems are different, the apps are still designed to work the same way.

<h3>How does an app work?</h3>

An app is known to be a kind of a software that gives room for a person to be able to carry out some specific tasks.

Note that Applications for desktop or laptop computers are said to be called desktop applications and those apps that are used in mobile devices are known to be called mobile apps.

Hence, The statement that  best explains the way that similar apps are used in different devices is option b:  Although the systems are different, the apps are still designed to work the same way.

Learn more about Software applications from

brainly.com/question/22442533

#SPJ1

6 0
2 years ago
The camera on a phone or laptop can be used to track a user's eye movements. Which of these is NOT one of the possible applicati
AnnyKZ [126]

Answer:

The question is incomplete. The full question is the following one:

"The camera on a phone or laptop can be used to track a user's eye movements. Which of these is NOT one of the possible applications of this technology (as listed in the course reading):

All of these ARE:

Measuring the user's intelligence,

Gathering marketing information for advertisers,

Detecting cognitive disorders."

The correct answer is: "Measuring the user's intelligence".

Explanation:

This technology is also known as eye tracking technology and has to do with a sensor that tracks eye movement and interaction with machines, such as mobiles and computers. The only option which does not apply to this technology and its features is the first one, "Measuring the user's intelligence", because "intelligence" is very subjective and abstract, it is not something a sensor can measure, although eye tracking technology can measure the amount of production concerning certain topics, the level of interest, attention, and interaction, and some cognitive disorders people behave, such as Attention Deficit Hyperactivity Disorder (ADHD). Besides that, companies, agencies, and institutional systems may track and gather people's eye movements in order to share them with other companies, agencies, and institutions for improving marketing, production, and interests.

(ps: mark as brainliest, please?!)

8 0
3 years ago
Create a Card class that represents a playing card. It should have an int instance variable named rank and a char variable named
Helen [10]

Answer:

Explanation:

The following code is written in Java. It creates the Card class and then uses it to create a full house and print out the rank and suit of every card in that hand.

class Card {

   int rank;

   char suit;

   public Card(int rank, char suit) {

       this.rank = rank;

       this.suit = suit;

   }

   public int getRank() {

       return rank;

   }

   public char getSuit() {

       return suit;

   }

}

class CardTester {

   public static void main(String[] args) {

       Card card1 = new Card(3, '♥');

       Card card2 = new Card(3, '♠');

       Card card3 = new Card(3, '♦');

       Card card4 = new Card(2, '♦');

       Card card5 = new Card(2, '♣');

       System.out.println("Card 1: " + card1.getRank() + " of " + card1.getSuit());

       System.out.println("Card 2: " + card2.getRank() + " of " + card2.getSuit());

       System.out.println("Card 3: " + card3.getRank() + " of " + card3.getSuit());

       System.out.println("Card 4: " + card4.getRank() + " of " + card4.getSuit());

       System.out.println("Card 5: " + card5.getRank() + " of " + card5.getSuit());

   }

}

3 0
3 years ago
Other questions:
  • Which company provides the Loki Wi-Fi mapping service?
    10·1 answer
  • Can someone fix this so that it only says "its a payday" on 15 and 30 and on all other days "sorry, it's not payday"
    9·1 answer
  • What is the output of the following function if the array nums contains the values 1 2 3 4 5 int backwards(int nums[]) { for (x
    15·1 answer
  • The exponential distribution is often used to model what in a queuing system?
    12·1 answer
  • A vacuum tube that contains a grid can be classified as a A. rectifier B. triode C. pentode D. diode
    12·1 answer
  • 6. According to camp policy, staff members need to be at least 23 years old to transport students. Dean now wants to determine h
    9·1 answer
  • What is the next line? &gt;&gt;&gt; myTuple = [10, 20, 50, 20, 20, 60] &gt;&gt;&gt; myTuple.index(50) 3 1 4 2
    14·2 answers
  • g 'write a function that takes as input a list and outs a new list containing all elements from the input
    5·1 answer
  • Which of the following statements about the relationship between hardware and software is true? a) Hardware can be present in in
    9·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!