Skip to content

Commit

Permalink
파라메터 수가 잘못된 경우메시지 출력및 프로그램 종료 수정
Browse files Browse the repository at this point in the history
입력된 수가 없을 경우 경고 메시지 출력및 프로그램 종료 GDG-Korea#19

Signed-off-by: Jongsoo Lee <[email protected]>
  • Loading branch information
recursivecurry committed Mar 15, 2014
1 parent d335260 commit 1ee036e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Fibonacci.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
public class Fibonacci{

public static void main(String []args){
if (args.length != 1) {
System.out.println("USAGE: java Fibonacci <number>");

return;
}
int start = Integer.parseInt(args[0]);
BigInteger fib1 = new BigInteger("0");
BigInteger fib2 = new BigInteger("1");
Expand Down

0 comments on commit 1ee036e

Please sign in to comment.