Question: Write a user-defined recursive function that takes an integer number as an input and ca output according to the following rules: if the number is
Write a user-defined recursive function that takes an integer number as an input and ca output according to the following rules: if the number is odd generates 0. if the number is even, outputs the sum of all even numbers less than or equal to the input Example: If the input is 8 the result will be: 20 (=8+6+4+2+0) Note: There is no need to write the main function and call the function. Only type the required program for the recursive user-defined function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
