Write a fragment of code that will compute the sum of the first n positive odd integers.

Question:

Write a fragment of code that will compute the sum of the first n positive odd integers. For example, if n is 5, you should compute 1 + 3 + 5 + 7 + 9.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: