(1) 엄청 간단한 사칙연산 계산기 만들기Java2022. 11. 15. 21:52
Table of Contents
728x90
728x90
Scanner s = new Scanner(System.in);
System.out.println("첫번째값입력");
int cal1;
cal1 = s.nextInt();
System.out.println("두번째값입력");
int cal2;
cal2 = s.nextInt();
System.out.println(cal1+cal2);
System.out.println(cal1-cal2);
System.out.println(cal1*cal2);
System.out.println(cal1/cal2);
// 이후 콘솔창에 첫번째 숫자값, 두번째 숫자값을 입력하면 +,-,*,/값이 한번에 나온다
728x90
300x250
@mag1c :: 꾸준히 재밌게
2023.04 ~ 백엔드 개발자의 기록
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!