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, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
The basic work area of the computer is it screen that you when you first fire up your computer
Answers: 1
question
Computers and Technology, 24.06.2019 00:30
The best definition of an idiom is a. a word or phrase that describes a noun b. a word or phrase describing a verb c. a phrase containing figurative language in which the word expresses a different idea from its exact meaning d. a phrase that compares two unlike objects or ideas
Answers: 2
question
Computers and Technology, 24.06.2019 07:00
Why do we mark tlc plates with pencil and not with pen
Answers: 2
You know the right answer?
Write a function sumOfMultiples, that inputs two integers - seed and cap. The function should return...
Questions
question
Mathematics, 29.07.2019 10:00
question
Mathematics, 29.07.2019 10:00
Questions on the website: 13722360