Problem1180--for循环专题---特殊求和

1180: for循环专题---特殊求和

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 319  Solved: 251
[Status] [Submit] [Creator:]

Description

输入一个整数n,求 1-2+3-4......+/-n 的值,输出这个值。
(+/-n代表:如果n是奇数就是:+n,如果n是偶数就是:-n)

Input

一个正整数n(0<n<=100)

Output

一个整数

Sample Input Copy

4

Sample Output Copy

-2

Source/Category

 基础C