summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcd.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcd.java b/gcd.java
index abc505f..82722a1 100644
--- a/gcd.java
+++ b/gcd.java
@@ -29,6 +29,8 @@ public class gcd
}
public static void main(String [] argv) {
+ if (argv.length == 0)
+ return;
int [] n = new int [argv.length];
for (int i = 0; i < argv.length; i++) {
n[i] = Integer.parseInt(argv[i]);