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
English,
6 days ago
Computer Science,
6 days ago
Business Studies,
13 days ago
Math,
13 days ago
Physics,
8 months ago
Math,
8 months ago