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
To what would you compare the transport layer?
GarryVolchara [31]
The above question has multiple choices as below

<span>A. Data links
B. The post office
C. Driving a car
D. A train

The answer is (B) The Post Office.

In layman’s terms, transport layer is similar to the post office functions of delivering parcels and letters at the agreed delivery deadlines. It also notices any dropped info and re-transmits it.
Just like the post office, the transport layer directs messages and information between specific end users. If by mistake you write a letter to the wrong person, the letter will be returned and the postal employee will stamp it as address unknown.

</span>
4 0
2 years ago
Andrea needs to format the legend on her chart. She clicks on the chart to select it. Which of the
Sever21 [200]
For Andrea to format the legend on her chart, she needs to click on the chart to select it. The Chart Tools option appears when a chart is selected. Andrea can build charts easily and successfully using the Chart Tool in Microsoft Excel or any other Spreadsheet programme. Let us assume that Andrea is using Microsoft Excel to create her chart. When she opens Excel and looks at the ribbon band on top of the new spreadsheet, there is an option to create charts. Using this option, she can create as many charts as she needs to 
7 0
3 years ago
Shut down and unplug the computer. Remove the CPU case lid. Locate the various fans, and then use
nlexa [21]

Answer:

Cleaning the fan

Explanation:

Just did it on Ed

Would you mind giving me brainliest?

6 0
3 years ago
History timeline: who developed what elements first Windows OS and Apple OS?
Harrizon [31]

Answer:

i think bill gates

Explanation:

5 0
2 years ago
Read 2 more answers
Timeliness is an important goal of any access control monitoring system.<br> A. True<br> B. False
Damm [24]
The answer for this question is true
7 0
3 years ago
Other questions:
  • Select all that apply.
    15·2 answers
  • What can you do to make sure you have a healthy credit report
    13·2 answers
  • You are working on an excel table and realize that you need to add a row to the middle of your table. what is one way to do this
    12·1 answer
  • What term is used to refer to the way companies collect and process data in order to create new information to make important bu
    13·1 answer
  • Which method of accessing FTP has the most limited capabilities?
    9·2 answers
  • One common method of converting symbols into binary digits for computer processing is called ASCII​ (American Standard Code of I
    5·1 answer
  • Plz tell me how to get my deleted account back you will be highly PRAISED!!!!!!!!!!
    14·2 answers
  • If the user enters any operator symbol other than , -, *, or /, then an UnknownOperatorException is thrown and the user is allow
    8·1 answer
  • 1
    13·1 answer
  • Describe the method used by operating systems to differentiate between TCP connections.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!