For example, if the given range is 2 to 11
odds numbers in the range are 3, 5, 7, 9, 11 then count is 5.
even numbers in the range are 2, 4, 6, 8, 10 then count is 5.
Sample Input 1
2
N
Sample Output 1
Answers
Answered by
1
Explanation:
Given two numbers L and R, the task is to count the number of odd numbers in the range L to R.
Examples:
Input: l = 3, r = 7
Output: 3 2
Count of odd numbers is 3 i.e. 3, 5, 7
Count of even numbers is 2 i.e. 4, 6
Input: l = 4, r = 8
Output: 2
Similar questions
Computer Science,
1 month ago
Business Studies,
2 months ago
Math,
2 months ago
Physics,
10 months ago
Math,
10 months ago