Even Odd
Submissions: 5717   Accuracy:

36.19%

  Difficulty: Easy   Marks: 2
Associated Course(s):   Fork CPP

We've learnt about operators and other basics of CPP. Now, it's time to take another leap and learn to use control structures that helps us choose flow of any code.

Given two integers A and B. Your task is to print the even number first and odd number next in individual lines.

Input Format:
First line of input contains number of testcases. For each testcase, there will be single line containing a and b.

Output Format:
For each testcase, print the even number first and odd number next in individual lines.

Your Task:
Just complete the function evenOdd that takes two integers as input parameters.

Constraints:
1 <= T <= 100
0 <= A,B <= 108

Example:
Input:

1
4 5

Output:
4
5

Example:
Testcase 1:
4 is even and printed first. 5 is odd and printed next.

** For More Input/Output Examples Use 'Expected Output' option **

Author: Dhiman Mayank


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.