8000 Kyu 8 | 101 Dalmatians - squash the bugs, not the dogs! · danielex1999/CodeWars-Java@c03b49c · GitHub
[go: up one dir, main page]

Skip to content

Commit c03b49c

Browse files
committed
Kyu 8 | 101 Dalmatians - squash the bugs, not the dogs!
1 parent 035c532 commit c03b49c

File tree

1 file changed

+8
-2
lines changed
  • src/main/java/kyu8/dalmatians101SquashTheBugs

1 file changed

+8
-2
lines changed
Lines changed: 8 additions & 2 deletions
+
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
package kyu8.dalmatians101SquashTheBugs;
22

33
public class ZywOo {
4
45
public static String howManyDalmatians(int number) {
6+
57
String[] dogs = {"Hardly any", "More than a handful!", "Woah that's a lot of dogs!", "101 DALMATIANS!!!"};
6-
return number <= 10 ? dogs[0] : number <= 50 ? dogs[1] : number == 101 ? dogs[3] : dogs[2];
8+
9+
String respond = number <= 10 ? dogs[0] : number <= 50 ? dogs[1] : number == 101 ? dogs[3] : dogs[2];
10+
11+
return respond;
712
}
8-
}
13+
14+
}

0 commit comments

Comments
 (0)
0