Question: Assignment 4 Total 50 points 1. (10 points) Write a program as follows: (nl should be less than n2) b. If the user enters the
Assignment 4 Total 50 points 1. (10 points) Write a program as follows: (nl should be less than n2) b. If the user enters the negative number(s), convert it/them to positive number(s). c. If nl is greater than n2, swap them. d. Use a while loop to output all the even numbers between nl and n2. e. Use a while loop to output the sum of all the odd numbers between nl and n2. f. Use a while loop to output the sum of squares of all the odd numbers between nl and n2. e Use a while loop to output all the lower case letters. Sample run: Enter two numbers (First number must be less than the second number) Enter the first number:-21 Enter the second number: 5 Even integers between 5 and 21 are: 6 8 10 12 14 16 18 20 Sum of odd integers between 5 and 21 117 Sum of the squares of odd integers between 5 and 21 1761 Lover case letters are: a bedefghijki mnoPqIStuvwxyz
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
