subject

Write a function sumOfMultiples, that inputs two integers - seed and cap. The function should return the sum of all the multiples of seed present between 1 and cap (both inclusive). Your function should be named sumOfMultiples. Your function has two parameters in the order: seed: integer argument whose multiples need to be summed. cap: integer argument indicating the upper limit of the multiples to be added. Your function should return the sum of the multiples: an integer value. Your function should not print/output anything Examples: For the input arguments sumOfMultiples(6, 20), the function should return 36. (Explanation: the multiples of 6 between 1 and 20 are 6, 12 and 18. The sum of these multiples is 36). For the input arguments sumOfMultiples(1, 3), the function should return 6. (Explanation: the multiples of 1 between 1 and 3 are 1, 2 and 3. The sum of these multiples is 6).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Search the web for two examples of digital art that you like. the examples must be from different mediums (example: one digital photo and one computer animation not two computer animations). compose an essay for each example you choose about why the piece appeals to you, and identify the medium used.
Answers: 1
question
Computers and Technology, 22.06.2019 02:30
Your boss wants you to configure his laptop so that he can access the company network when he is on the road. you suggest a vpn connection to him. he is very concerned about security and asks you how secure vpn is. what do you tell him?
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
Hi plz 11 ! when planning a table, what step comes first: "define the column headers" or "calculate the number of columns/rows"? a. calculate the number of columns/rows b. define the column headers
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
You know the right answer?
Write a function sumOfMultiples, that inputs two integers - seed and cap. The function should return...
Questions
Questions on the website: 13722367