SHARE
TWEET

Untitled

a guest Oct 10th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Arrays;
  2. import java.util.Scanner;
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.     Scanner sc = new Scanner(System.in);
  7.         int i = sc.nextInt();
  8.         int [] m = new int [i];
  9.         int x;
  10.         for (int j = 1; j < i; j++) {
  11.             m[j] = sc.nextInt();
  12.         }
  13.         x = sc.nextInt();
  14.         m[0] = x;
  15.  
  16.         System.out.println(Arrays.toString(m));
  17.     }
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top