do~while 구문
Last updated
Last updated
import java.lang.*;
import java.util.*;
public class DoWhileExample01 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int score;
do {
System.out.println("점수 입력");
score = sc.nextInt();
}
while(score < 0 || score > 100);
System.out.println("입력한 점수 : "+score);
sc.close();
}
}