Skip to content
Advertisement

How to print odd numbers using recursive java with the limits = n

I’m a newbie of programming languages.

I have the following code

JavaScript

if i make the limits is 7, the output should be :

the output : 1, 3, 5, 7

Advertisement

Answer

JavaScript

You can use below code:

JavaScript

if you dont have any library other than jdk.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement