Design a class to enter two numbers as a range (a and b).Print the total even and odd numbers within the range
Answers
Answered by
1
Answer:
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
Art,
8 days ago
Accountancy,
8 days ago
English,
16 days ago
Chemistry,
9 months ago
Social Sciences,
9 months ago