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 14:00
Which database model is best used for data warehouse and data mining
Answers: 3
question
Computers and Technology, 22.06.2019 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
You know the right answer?
Write a function sumOfMultiples, that inputs two integers - seed and cap. The function should return...
Questions
question
Mathematics, 02.10.2019 20:20
question
Mathematics, 02.10.2019 20:20
question
Mathematics, 02.10.2019 20:20
question
Mathematics, 02.10.2019 20:20