Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- 자바 공부
- javareview
- 맥os 데이터베이스
- 자바 거스름돈구하기
- 자바 커피
- 자바계산
- Mac db
- 맥 데이터베이스
- 맥북 개발
- 자바실수
- java거스름돈구하기
- 맥북 데이터베이스
- 맥 오라클
- 자바 복습
- 맥 sql설치
- Mac Sqlplus
- 자바연산
- 자바거스름돈
- 자바복습
- 자바연산자
- mac oracle
- 자바연산자사용
- 맥북 데이터베이스 설치
- 자바
- 자바변수
- java
- 자바공부
Archives
- Today
- Total
DevTagebuch
원하는 진수변환과 값 입력 후 출력 (Scanner, If) 본문
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
System.out.print("입력진수 결정 <1>10 <2>16 <3>8 ==>");
int a=s.nextInt();
System.out.print("Input Number");
int b=s.nextInt();
if (a==1)
System.out.printf("10진수 ==> %d",b);
if (a==2)
System.out.printf("16진수 ==> %x",b);
if (a==3)
System.out.printf("8진수 ==> %o",b);
s.close();
'Java > Do it' 카테고리의 다른 글
거스름돈 구하기_1 (0) | 2020.04.19 |
---|---|
두 실수의 연산 (0) | 2020.04.19 |
for 문 사용하여 입력된 문자열 거꾸로 출력하기 (0) | 2020.04.18 |
기본 자바형 크기 구하기 (0) | 2020.04.18 |
임의의 정수를 받아 진법 변환 하기 (0) | 2020.04.18 |
Comments