Given two integers, l, and r, print all the odd numbers between l and r (l and
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 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 the 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
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill