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
Nadusha1986 [10]
3 years ago
12

Write a program that computes the sum of the first tenpositive integers, 1 + 2 + ..+ 10.

Computers and Technology
1 answer:
Stella [2.4K]3 years ago
6 0

Answer:

#include <iostream>  

using namespace std;

int main()

{

  int sum=0;//taking an integer variable to store the sum with initial value 0..

  for(int i=1;i<=10;i++)//looping from 1 to 10..

  {

      sum+=i;//adding each i in the sum..

  }

  cout<<sum<<endl;//printing the sum..

   return 0;

}

Explanation:

output :- 55

1.I have taken an integer variable sum which is equal to 0.

2.Looping over first ten positive integers.

3.Adding every number to sum.

4.Printing the sum.

You might be interested in
What G-Suite Apps integrate with Forms
Ierofanga [76]
I think it’s Google Sheets
4 0
4 years ago
Read 2 more answers
Can a percent be used in a filename?
alina1380 [7]
Hey There!

A percent can be used in a filename.
4 0
3 years ago
A ________ allows a hacker to gain access to your computer and take almost complete control of it without your knowledge. zombie
lozanna [386]
<span>A rootkit allows a hacker to gain privileged or 'root' access to a computer. A rootkit is designed to actively hide its presence so that the attacker can continue having full access for as long as they need to carry out their intended malicious actions without being detected.</span>
6 0
4 years ago
A browser is a program that allow
Snezhnost [94]

C. users to access and view web pages on the internet.

6 0
3 years ago
A related database stores data in the form of______
avanturin [10]

Answer:

Lists.

Explanation:

A relational database stores data in the form of lists.

6 0
3 years ago
Other questions:
  • You have been asked to create an authentication security plan for your company. Which of the following components would you inco
    14·1 answer
  • Which of the following would you click to access Help and Support?
    6·2 answers
  • Which of these tools can best be used as a self assessment for career planning purposes
    12·1 answer
  • What does "CYBER-COCKROACH" mean??
    15·1 answer
  • How can you create the first row of the table as the header of the table
    15·2 answers
  • 18. Which type of briefing is delivered to individual resources or crews who are assigned to operational tasks and/or work at or
    14·1 answer
  • In a relational database, the three basic operations used to develop useful sets of data are:
    10·1 answer
  • An interrupt priority scheme can be used to ____. allow the most urgent work to be finished first make it possible for high-prio
    14·1 answer
  • The term _____________ refers to software license agreements that are included within a box of physical-media software.
    9·1 answer
  • Independence day in school long passage plss​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!