일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- E-P1
- 알고리즘
- imread
- GT-S80
- mariadb
- RNN
- ipad
- javascript
- 삼성소프트웨어멤버십
- Series
- dataframe
- LSTM
- pycharm
- DFS
- install
- Python
- Button
- index
- pip
- Numpy
- Lotto
- keras
- Splunk
- CNN
- pandas
- GitHub
- SciPy
- synology
- SPL
- mean
Archives
- Today
- Total
잠토의 잠망경
Ex5 본문
import java.io.*; public class ex5 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub try{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int inVal=0; while(true){ System.out.println("1: inch to cm"); System.out.println("2: 5배수인가? "); System.out.println("3: 종료 "); System.out.println(">> "); inVal = Integer.parseInt(in.readLine()); if(inVal==3) { System.out.println("프로그램을 종료합니다."); break; }else if(inVal==1) { System.out.println("입력>> "); inVal = Integer.parseInt(in.readLine()); System.out.println(inVal+"inch=> "+inVal*2.54+"cm"); }else if(inVal==2) { System.out.println("입력>> "); inVal = Integer.parseInt(in.readLine()); System.out.println("입력한 "+inVal+"는 5의 배수"+ (inVal%5!=0? "가 아닙니다.":"입니다.")); }else{ System.out.println("잘못된 숫자를 입력하셨여요. 다시 입력해주세요."); } } } catch(Exception e) { System.out.println("Error: "+e); } finally{ System.out.println("Proram End"); } } }
Comments