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

PROGRAMMING:Finding the sum of the first n odd numbers

Luz5年前 (2021-05-10)题库335
This problem requires programming to calculate the sum of the first 'n' odd numbers.
###Input format:
Enter a positive integer 'n' on a line.
###Output format:
In one line, output the value's' of the partial sum in the format of "sum = s". Please note that there is a space on the left and right of the equal sign. The topic guarantees that the calculation result does not exceed the range of long integers.
###Input example:
```in
six
```
###Output example:
```out
sum = 36
```







answer:If there is no answer, please comment