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
melomori [17]
4 years ago
15

c++ Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum

that has already been declared and initialized to 0. In addition, there is another variable, num that has also been declared. You must not use any other variables.
Computers and Technology
1 answer:
ElenaW [278]4 years ago
5 0

Answer:

#include <iostream>

#include <cstdlib>

 

using namespace std;

 

int main(){

 

 

   int sum=0, num=5;   //variables declaration and inicialization

 

   while (sum<500){   //conditioning to do the sum up to 500

   sum=sum+num;     //actually sum process

   cout << "The value is: "<<sum;   //show the result in screen

   };

   return 0;

}

You might be interested in
As of 2012, Twitter has approximately how many members?
Artyom0805 [142]

Answer:

B

Explanation:

FROM STATISTICS ON TWITTER IT WAS 465MILLION USERS

4 0
3 years ago
Folders are containers used to organize the documents into manageable groups on a designated storage device. true or false
AysviL [449]

Answer:

true

Explanation:

folders are used to organize documents into manageable groups on storage devices

5 0
3 years ago
Write code using the range function to add up the series 20, 30, 40, ... 90 and print the resulting sum each step along the way.
andrew11 [14]

Answer:I DK but if you expaln it I can help. Sorry.

Explanation:

3 0
3 years ago
What dose a bios system do?
ANTONII [103]
BIOS instructs the computer on how to preform basic functions such as booting and keyboard control. It is also used to identify and configure the hardware in a computer
4 0
3 years ago
Read 2 more answers
What would be the consequences if the Memory Manager and the
Ann [662]

Answer:

Result could be a memory leak or a spaceleak.

Explanation:

The result if a memory supervisor and a processor administrator quit conveying would prompt a negative result as they have to impart all together for the procedure manager to process the data that is being conveyed in and out.

3 0
3 years ago
Other questions:
  • When composing a tweet with images attached in hootsuite, bear in mind that _____ characters are used up by the photos?
    9·1 answer
  • Templates allow for the quick creation of _____.
    7·1 answer
  • "In about 100 words, describe the idea behind software as a service (SaaS). In your answer, include at least three examples of e
    10·1 answer
  • What is a Qwerty?<br> A) It's a Computer<br> B) It's a keyboard <br> C) A type of frog
    11·2 answers
  • Dwight <br> d. eisenhower was impressed with germany's network of highways and how it __________.
    15·1 answer
  • What is the function of control unit? in computer. <br>​
    8·1 answer
  • Write a script that will calculate a person’s weight on each planet of the solar system, the sun, and the moon. You should creat
    11·1 answer
  • In the range D5:D9 on all five worksheets, Gilberto wants to project next year's sales for each accessory, rounded up to zero de
    6·1 answer
  • Five jobs arrive nearly simultaneously for processing and their estimated CPU cycles are, respectively: Job A = 2 ms, Job B = 12
    7·1 answer
  • In python, what is the difference between a dictionary and a set? How are they similar?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!