Problem 3
Plus Minus
Given n as input. Print following pattern:
-1+2-3+4-5+6-....(+/-)n=totalSum TillN
We add even numbers and subtract odd numbers.
Input
Output
Test Cases
n = 6
-1-2-3-4-5-6-}
Dry Run
n = 5
Answers
Answered by
0
f vs Bugatti Veyron drag race and the other side of the plant is jute Mills Ltd gunti behror alwar rajasthan high court jaipur
Similar questions