Long Sequence


Submit solution


Points:100 (partial)
Time limit:0.3s
Memory limit:60M
Author:

Tags
Loops
Difficulty
Preparation

Allowed languages
C#, C++, C++ 14, cpp, java, JavaScript, kt, php, Python, Swift

Write a program that prints the first 1000 members of the sequence: 2, -3, 4, -5, 6, -7, …

  • You might need to learn how to use loops in Java (search in Internet).

Input

  • There is no input for this task.

Output

  • Output the first 1000 members of the sequence, each on a separate line.
2
-3
4
-5
6
...

Comments

There are no comments at the moment.