백준 #2083번 럭비 클럽

jhj·2024년 2월 5일

백준 JAVA

목록 보기
146/583
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String name = sc.next();
		int age = sc.nextInt();
		int weight = sc.nextInt();
		
		while(name.equals("#") == false && age != 0 && weight != 0) {
			System.out.print(name + " ");
			if(age > 17 || weight >= 80) {
				System.out.println("Senior");
			}else {
				System.out.println("Junior");
			}
			name = sc.next();
			age = sc.nextInt();
			weight = sc.nextInt();
		}
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글