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]
2 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]2 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
One of the most famous ___ licenses is gpl, which ensures that a particular program remains free to distribute and allows its co
stich3 [128]
One of the most famous EULA licenses is GPL, which ensures that a particular program remains free to distribute and allows its code to be examined and modified by anyone. EULA stands for End User License Agreement. It is the agreement between the licensor and purchaser, where the <span>purchaser is given </span><span>right of using the software. 
GPL is the GNU General Public License.</span>
6 0
3 years ago
g The reciprocal Fibonacci constant ψ is defined by the infinite sum: ψ=∑n=1 [infinity] 1 Fn Where Fn are the Fibonacci numbers
timama [110]

Answer:

see explaination

Explanation:

MATLAB script:

% MATLAB script that calculates reciprocal Fibonacci constant Ψ

% Initial Values

a0 = 1;

a1 = 1;

% Looping variable

i = 2;

% Reading n value from user

n = input(' Enter n value: ');

% Initializing sum

sum = (1/a0) + (1/a1);

% Loop till i reaches n value

while i <= n

% Finding term in Fibnocii series

a2 = a0 + a1;

% Accumulating Sum

sum = sum + (1/a2);

% Updating previous terms

a0 = a1;

a1 = a2;

% Incrementing loop variable

i = i + 1;

endwhile

% Printing result

printf("\n Reciprocol Fibnocii Constant: %f \n", sum);

See attachment for sample output

5 0
3 years ago
What determines the keystroke to open a cmos editor? how can you find this information?
Brums [2.3K]
<span>Determining the keystrokes of opening the cmos editor depends on the ram contained in the parameters in BIOS.It can be a very daunting task however made more accessible by instructions detailed in various ways by others.Research is needed.</span>
3 0
3 years ago
jenny wants to create a resume after a two year gap. what should she consider? jenny has a two year gap between her last two job
Lunna [17]

Answer:

functional

Explanation:

Suppose you are pivoting to a certain new company, and you find that your experience is not suited. You are certainly going to highlight your skills that are required for the job. And suppose you are lacking work experience, concerning the position you are opting for. Also, you have many gaps in employment. Then the best format suited to you is functional format.

6 0
3 years ago
Read 2 more answers
Pls help me computer science discoveries
lara31 [8.8K]

Answer:

jdinwoahdjsioadjsakodsiaohdeioajfnsohfujkdshksyfneowjdfikdjiadjsadhnsuidghaiudbnha

Explanation:

3 0
2 years ago
Other questions:
  • Which of the following situations would not require knowledge of networking?
    6·1 answer
  • Why ois my printer not printing pictjures?
    9·1 answer
  • Big Data often involves a form of distributed storage and processing using Hadoop and MapReduce.
    12·1 answer
  • The ____ button resets slide placeholders to their default position, size, and text formatting.
    11·1 answer
  • A(n) _____ measures the ability to juggle a variety of demands, as in a manager's job where the candidate is presented with simu
    8·1 answer
  • Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
    8·1 answer
  • Write a program that extracts the last three items in the list sports and assigns it to the variable last. Make sure to write yo
    8·1 answer
  • The physical parts or components of a computer system is called?
    8·2 answers
  • What is the difference between EPROM and EEPROM, explain why​
    11·1 answer
  • What is connectivity?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!