e có đoạn code này mà đến khúc cuối làm sao cho nó chỉ in 1 hàng thui chứ thấy chạy hoài
System.out.println("hay nhap tu 1 den 10");
Scanner sc= new Scanner(System.in);
int result = sc.nextInt();
sc.close();
for(int column=1;column<=result;column++){
for(int row=1;row<=column;row++){
System.out.print("*");
}
System.out.println(" ");
}
while(result>10){
System.out.println("gia tri k phu hop");
}
}