Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- import java.util.List;
- import java.util.Scanner;
- public class LongSequence_3 {
- public static void main(String[] args) {
- //Print the numbers from zero to 1000
- for (int i = 2; i <= 1000; ++i) {
- if (i%2==0)
- {
- System.out.println(i);
- }
- else
- {
- System.out.println(i * -1);
- }
- System.out.println();
- }
- }
- }
Add Comment
Please, Sign In to add comment