728x90 반응형 java1 자바 기초 (입출력) import java.util.Scanner; public class p01 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String name=""; int student_number=0,gender=0; System.out.println("이름>>"); name = scanner.next(); System.out.println("성별(남:1,여:2)>>"); gender = scanner.nextInt(); System.out.println("학번>>"); student_number = scanner.nextInt(); String gender_string="여"; if (gender==1) ge.. 2022. 9. 17. 이전 1 다음 728x90 반응형