-->
当前位置:首页 > 题库

PROGRAMMING:Sum of odd sequence

Luz5年前 (2021-05-10)题库445
Here is the sequence of odd numbers:
$$1, 3, 5, 7, 9, ...$$
Please write a program to input the number of items of odd number sequence $$n $, and find the sum of the first $$n $$items of odd number sequence $$s $.
####Input format
> $$n$$
####Output format
> $$s$$
Note: the title guarantees that the values of $$n $$and $$s $$are in the range of int type representation.
####Input sample
```in
two
```
####Output sample
```out
four
```







answer:If there is no answer, please comment