Last active
December 18, 2017 10:36
-
-
Save aperture147/6f688b054145180bf56c3cab03454aae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class MainApp { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.print("Nhap do dai mang: "); | |
int n = input.nextInt(); | |
int[] array = new int[n]; | |
for (int i = 0; i < n; i++) { | |
System.out.printf("array[%d]=", i); | |
array[i] = input.nextInt(); | |
} | |
System.out.println("Mang da nhap la: "); | |
for (int i = 0; i < n; i++) { | |
System.out.print(array[i] + " "); | |
} | |
System.out.println(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment