This file contains hidden or 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 Hello { | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
//dài | |
System.out.println("Nhập chiều dài mảng: "); | |
int dai=0; | |
boolean flag; | |
do { |
This file contains hidden or 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
public class Hello { | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
//dài | |
System.out.println("Nhập chiều dài mảng: "); | |
int dai=0; | |
boolean flag; | |
do { | |
flag =sc.hasNextInt(); | |
if (flag) dai=sc.nextInt(); |