Question: Given two integers, l and r, print all the odd numbers between l and r (l and r inclusive) Complete the oddNumbers function: It has

Given two integers, l and r, print all the odd numbers between l and r (l and r inclusive)

Complete the oddNumbers function: It has 2 parameters:

1. An integer l, denoting the left part of the range.

2. An integer r, denoting the right part of the range.

The function must return an array of integers denoting the odd numbers between l and r.

Input Format:

Read the following input:: the first line contains an integer, l, denoting the left part of the range.

The second line contains an integer, r, denoting the right part of the range.

Constraints:

1<_l<_r<_10^5

Output Format: The function must return an array of integers denoting the odd numbers between l and r.

Sample Input 0: 2,5

Sample Output 0

Explanation 0: The value of l is 2 and value of r is 5. The odd numbers between [2,5] are 3 and 5.

Please code in java, javascript, c, or C++. I have tried but have gotten nowhere with this problem

Thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!