Skip to content
Advertisement

Write a program to print the sum of 1 to n. While calculating sum omits the numbers which are multiples of x. Note :Use the concept of continue

Please help me with this I’m not able to omit number of multiple x

JavaScript

Advertisement

Answer

Keywords such as for and continue shouldn’t be capitalized:

If you’re trying to find the sum of numbers that are not multiples of x then you can try this:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement