Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner sc = new Scanner(System.in);
- int n = sc.nextInt();
- int[] arr = new int[n];
- for (int i = 0; i < n; i++)
- {
- arr[i] = i + 1;
- System.out.printf("%d ", arr[i]);
- }
- System.out.println();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement