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
In the retrieval phase of Godden and Baddeley (1975) study of the encoding specificity principle, participants were asked to sup
kicyunya [14]

Answer:

recall

Explanation:

Based on the scenario being described within the question it can be said that this was a recall measure of memory. In the field of neuroscience, a recall test refers to a type of test in which subjects are shows a certain stimuli and are later asked to remember as many stimuli as they can. Which in the case of the Godden and Baddeley (1975) study the stimuli were a set of words that were shown to the subjects.

5 0
3 years ago
a FOR loop that will draw 3 circles with a radius of 20 exactly 50 points apart in a vertical line. the first points should be (
svlad2 [7]

Answer:

hfdhcb

Explanation:

lhvsxdlwsd

3 0
2 years ago
The rhythmic note that three beats is called a____half note.
aev [14]

Answer:

it is called a dotted half note

7 0
3 years ago
Read 2 more answers
Who designed the Analytical Engine in the 1830s? Alan Turing Alan Turing Charles Babbage Charles Babbage Bill Gates Bill Gates S
Dmitriy789 [7]
Charles Babbage Charles Babbage
7 0
2 years ago
A college asks you to write about a novel that is meaningful to you. What should you include in this essay?
Marina CMI [18]

The answer is C because they want you to compare it your or others lives.

4 0
3 years ago
Other questions:
  • Write a program that lets the user enter the name of a team and then displays the number of times that team has won the World Se
    9·1 answer
  • In addition to key executives, there are other positions in a company that may be considered critical, or whose loss will be dif
    5·1 answer
  • Create a derived class called Car that inherits from Vehicle. The constructor should call the base class constructor, with 4 for
    13·1 answer
  • When you catch an Exception object, you can call ____ to display a list of methods in the call stack so you can determine the lo
    6·1 answer
  • A company has two geographically separate locations that need to connect using a VPN. Which of the following devices must be spe
    7·1 answer
  • Which of the following statements are true?
    11·1 answer
  • which of these tools stick to the edge of an image, thus making it easy to select the shape of an image
    6·1 answer
  • Can you guys give some samples of STEM-related studies?​
    7·2 answers
  • Microsoft Word cannot be used to create personalized web<br> pages.<br> OTrue<br> False
    7·1 answer
  • Pls say correct guyz pls pls pls
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!