Description
Write a program that uses while loops to perform the following steps. a. Create a user-defined function called Validate_User_Input() to prompt the user to input two positive integers and validate the user’s input. Validate_User_Input() is a value returning function; doesn’t accept any arguments and returns First_Num and Second_Num. Variables: First_Num and Second_Num (First_Num must be less than Second_Num). (use while loop to validate and repeat).b. Create a user-defined function called Odd_Numbers() to output all odd numbers between First_Num and Second_Num (use while loop). Odd_Numbers() is a void function; accepts First_Num and Second_Num as arguments and doesn’t return any values.c. Create a user-defined function called Sum_Even_Numbers() to output the sum of all even numbers between First_Num and Second_Num (use while loop). Sum_Even_Numbers() is a value returning function; accepts First_Num and Second_Num as arguments and returns the sum of all even numbers. Declare a variable called Sum_Even in the main() to store the returned value from Sum_Even_Numbers().d. Create a user-defined function called Sum_Squre_Odd_Numbers() to output the sum of the square of the odd numbers between First_Num and secondNum (use while loop). Sum_Squre_Odd_Numbers() is a value returning function; accepts First_Num and Second_Num as arguments and returns the sum of the square of the odd numbers. Declare a variable called Sum_Square_Odd in the main() to store the returned value from Sum_Squre_Odd_Numbers(). e. Create a user-defined function called main() to repeat a program (use while loop) and execute the user-defined functions; Validate_User_Input(), Odd_Numbers(), Sum_Even_Numbers() and Sum_Squre_Odd_Numbers(). main() is a void function; doesn’t accept any arguments. Program layout for each step. Include the comments in your code.#AValidate_User_Input() #BOdd_Numbers() #CSum_Even_Numbers() #DSum_Squre_Odd_Numbers() #Emain() #Executing Program.main() ***Allow the user to repeat the program. (requires another while loop).***Do NOT define any additional functions. Use only built-in functions that have been discussed in class.***Use only topics (Modules 01 – 07 and lecture) that were covered in class.***Your program output must be exactly the same as the output in the OUTPUT section, except font style.
Amanda Shavers –
It was quality work and in a timely manner. It was the help I needed at the time, and I appreciate it so very much.
Fred Halfpap –
Fantastic support for every assignment, every time. 5+ Stars!
Gary Spinell –
The assignments I submit are always of great quality and completed on time.