Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class hw2{
- public static void main(String[] args){
- Scanner scan = new Scanner(System.in);
- int b = scan.nextInt();
- int[] a = new int[b];
- int[] c = new int[b];
- for(int i=0; i<a.length; i++){
- a[i]=scan.nextInt();
- }
- System.arraycopy(a, 0, c, 1, b-1);
- System.arraycopy(a, b-1, c, 0, 1);
- for(int i=0; i<c.length; i++){
- System.out.print(c[i]+" ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement