CS201 Assignment 1, Solution fall 2017- Vu Learning Zone



Write a program that will
  1. Ask the user to enter lower limit and upper limit in the form of integer numbers.
  2. The program will then add / sum all those numbers between upper limit and lower limit (including the lower and upper limits) which are NOT multiple of 4.
  3. This process should continue for all the remaining integer numbers up until the upper limit is reached.
  4. The program will then show the aggregate sum of all numbers for the given range.




Make sure that lower limit entered by the user should be greater than zero. Also the upper limit value entered by the user should be greater than the lower limit value.

Example:
Lower limit is 1 and Upper limit is 8 then the program will subtract 4 and 8 as these are the multiples of 4. While add remaining integers in the range (1+2+3-4+5+6+7-8 = 12). So, 12 is the calculated number.


Sample output for correct input:
cs201 assignment output
CS201 Assignment 1 solved by zeeshan fareed.



Oldest