1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
RUDIKE [14]
3 years ago
7

A recursive method may call other methods, including calling itself. A recursive method has:

Computers and Technology
1 answer:
kap26 [50]3 years ago
8 0

Answer:

Hence the answer is given as follows,

Explanation:

Base Case:-  

If (num == 0) //This is the base case for the given recursive method  

return 1;  

If(num % 2!=0) checks whether num is odd.  

The above condition is true for all odd numbers and false for even numbers.  

if the remainder is not equal to zero when we divide the number with 2 then it is odd.  

The method:-  

The above recursive method calculates the product of odd numbers up to the given range(that is num)  

For num=5   => 15(5*3*1).  

For num=7   => 105(7*5*3*1).  

For num=10 => 945(9*7*5*3*1).

You might be interested in
Discuss the major differences in two approaches ofprogramming i.e. Object oriented programming and structuredprogramming.
Romashka-Z-Leto [24]

Answer:

Differences between Object Oriented Programming and Structured Programming

1. Structured programming focuses on process/logic then data while OOP(Object Oriented programming) focuses on data.

2.OOP supports Inheritance,Encapsulation,Abstraction,Polymorphism while structured programming does not supports these.

3.Structured programming follows top-down approach while OOP follows bottom-up approach.

4.OOP is more secured than structured programming because it supports Abstraction (data hiding).

7 0
3 years ago
For our computer club in school, we are making a discord server and seeing who can get the most members. I am making an Anime Se
Gwar [14]

Answer:

misteragua#1874

Explanation:

5 0
2 years ago
Can someone be my friend please i will accept you
astra-53 [7]
I will be your friend
4 0
3 years ago
Read 2 more answers
Grade 10 python exercise
lbvjy [14]

number = 547

nums = {1:"one", 2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine"}

print("The last digit of",number,"is",nums[number%10])

I wrote my code in python 3.8. I hope this helps.

7 0
3 years ago
you are a new lenovo service provider and need to use the recovery utility information on the lenovo support website. this infor
yawa3891 [41]

Based on the above, the person that  you  should contact to request a service provider user id and password is Regional leads

<h3>Who is a Regional leads?</h3>

The stores, merchandise, and general presence of the company in a given region are managed by region leaders. They make sure the objectives are achieved. If not, they come up with plans to achieve the goals. Leaders in a region are expected to comprehend both the local economy and its historical context.

A regional lead is a manager, educator, or administrator who is in charge of finding and supporting workforce champions within organizations within their assigned region. Hence, he or she is the best person for you to contact.

Learn more about Region from

brainly.com/question/2001834
#SPJ1

8 0
1 year ago
Other questions:
  • Ashley wants to know the oldest form of both water purification and waste disposal. Help Ashley determine the methods. The oldes
    14·1 answer
  • In 2007, this wireless security algorithm was rendered useless by capturing packets and discovering the passkey in a matter of s
    6·2 answers
  • In the layers toolbar, which layer will appear in front of your game
    9·1 answer
  • Design a circuit that has a 3-bit binary input B2, B1, B0 (where B2 is most significant bit and B0 is least significant bit) and
    14·1 answer
  • What is the difference between = and == in terms of java..?
    6·2 answers
  • PLEASE HELP THIS WAS DUE YESTERDAY AND I DIDN'T GET TO IT IN TIME!!!!!!
    8·1 answer
  • If you wanted to create a line of code that would add ten to the user’s current score, which code should you use?
    12·2 answers
  • 6.What does transgenic mean?​
    12·2 answers
  • In a _____, there is no skipping or repeating instructions. A. iteration B. sequence C. selection D. conditional
    10·1 answer
  • Why is computer called information processing machine....?​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!