Write a program that takes an input value

Write a program that takes an input value (for example, a number 5). The output should be sum of all numbers from 1 to the value input by the user (in this example, the output would be 1+2+3+4+5 i.e. 15). Explain your logic.  2) Write a program that outputs only even numbers starting from ‘2’ upto ’20’ (including 20) i.e. output should be 2, 4, 6, 8, …20. >>DON’T NEED to Explain your logic.

Looking for this or a Similar Assignment? Click below to Place your Order

Open chat