Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c03b49c

Browse files
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)

AltStyle によって変換されたページ (->オリジナル) /