Question: Problem 1 (10 points) Sum of Odd Sequence Problem Description Given an odd integer N, calculate the sum of all the odd integers between 1

 Problem 1 (10 points) Sum of Odd Sequence Problem Description Given

Problem 1 (10 points) Sum of Odd Sequence Problem Description Given an odd integer N, calculate the sum of all the odd integers between 1 and N inclusive. Input First line of the input contains T, the number of test cases. Each test case contains a single integer N. N is between 1 and 100 Output For each test case output the value 1+3+...+N. Sample Input 10 1 3 5 7 9 Sample output 1 4 9 16 25 36 49 64 81 11 13 15 17 19 100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!