Sum of odd and even elements
Submissions: 4293   Accuracy:

22.76%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given an integer N, you have to print the sum of odd numbers and even numbers from 1 to N

Input:
First line consists of T test cases. First line of every test case consists of a Single integer N.

Output:
Single line output, with sum of odd numbers and even numbers respectively.

Constraints:
1 <= T <= 100
1 <= N <= 105

Example:
Input:

2
5
6
Output:
9 6
9 12

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

Contributor: PVash
Author: pvash1070091


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.