Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago