일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 삼성소프트웨어멤버십
- Lotto
- javascript
- Python
- LSTM
- ipad
- mariadb
- Numpy
- 알고리즘
- pip
- synology
- Splunk
- pandas
- E-P1
- Button
- GitHub
- dataframe
- mean
- RNN
- SPL
- DFS
- Series
- imread
- CNN
- keras
- index
- pycharm
- GT-S80
- SciPy
- install
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