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
MAXImum [283]
3 years ago
7

Write a program in which given an integer num, return the sum of the multiples of num between 1 and 100. For example, if num is

20, the returned value should be the sum of 20, 40, 60, 80, and 100, which is 300. If num is not positive, return 0.
Computers and Technology
1 answer:
zhuklara [117]3 years ago
5 0

Answer:

#include<iostream>

using namespace std;

int main()

{

  int num=0,sum=0;

  cout<<"Insert Number to find sum of mutiples.";

  cin>>num;

  int temp=num;

  if(num>0){

   sum+=num;

  while(num<100){

        num+=temp;

  sum+=num;

         

  }

  cout<<"Sum of Multiples is ="<<sum<<endl;

  }else{

  return 0;

  }

return 0;

}

Explanation:

This code is written in c++. Written by Saad-Ur-Rehman.

You might be interested in
What resources can be shared over a computer network?
quester [9]

Answer:birthday

Explanation:

4 0
3 years ago
Read 2 more answers
Anyone here play sims 4 and know how to help me with his last exception file?
zysi [14]

Answer:

Explanation:

What game is this

3 0
3 years ago
What is the importance of using the proper markup language?
Klio2033 [76]

the answer is D. without the right tags the content wont be accurately indexed

3 0
4 years ago
Read 2 more answers
Oof x oof = ? idk what that is
saveliy_v [14]

Answer:

= 1 off!

Explanation:

1x1

4 0
3 years ago
Read 2 more answers
HELP ASAP!!! What portfolio document is most likely to speak of your soft skills?
OlgaM077 [116]

Answer: resume

Explanation:

3 0
4 years ago
Other questions:
  • Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
    15·1 answer
  • The first electric, general-purpose computer, ENIAC, was programmed by calculating algorithms on paper entering code directly in
    14·1 answer
  • An online game is played with two dice. In this context, explain what is meant by decomposition
    8·1 answer
  • A file containing user information which is transmitted from an online server and attached to your web browser and stored on you
    11·1 answer
  • As we learned in the unit, basic speech is developed during the toddler years. To what extent do you think a toddler’s speech is
    7·1 answer
  • A user creates a GPO. What do you need to do for that user to manage his or her GPO that he or she created?
    12·1 answer
  • 1
    5·2 answers
  • BRAINLIESTTTT How does a project manager evaluate the scope of a project?
    12·1 answer
  • Copying materials from a source text without using is<br> considered plagiarism<br> ?
    5·1 answer
  • Html specifications that are not included when newer specifications are released or are not included in the xhtml specification
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!