I need help to solve these questions
Write a program that uses a while loop to display all the even and odd numbers in a range of two inputs. Then calculate their sum and average.
Enter a range of numbers: 3 16
The even numbers is: 4 6 8 10 12 14 16
Their sum is: 70
And their average is: 10
The odd numbers is: 3 5 7 9 11 13 15
Their sum is: 63
And their average is: 9
Write a program that reads positive integers until a –1 is entered. Once input terminates, the program should report the total number of even numbers entered, the average value of the even numbers and the same for odd numbers. The program should also indicate which of the two categories (odd or even) has the highest count and the highest average.
Please input the numbers, -1 to stop:
There were 6 even numbers and their average was 7.33
There were 3 odd numbers and their average was 49.66
There were more even numbers than odd numbers
Odd numbers average is higher
4. Write a program that uses a While loop to calculate the sum of all the odd numbers less than an input value and not including the numbers 3 and 5. So if the user inputs 13 the program should compute the value of 1+7+9+11 and outputs the results.
Enter a number: 13
Sum of odd numbers less than 13, excluding 3 and 5 is: 28