Skip to content

Commit 03b8f70

Browse files
authored
add test cases to fizzbuzz
1 parent 987a75e commit 03b8f70

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Others/FizzBuzz.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
public class FizzBuzz {
55

6-
public static void fizzBuzz(int n){
6+
static void fizzBuzz(int n){
77
for (int i = 1; i < n; i++) {
88
if( i % 3 == 0 && i % 5 == 0){
99
System.out.println("FizzBuzz");
@@ -16,4 +16,12 @@ public static void fizzBuzz(int n){
1616
}
1717
}
1818
}
19+
20+
public static void main(String[] args) {
21+
fizzBuzz(80);
22+
fizzBuzz(103);
23+
fizzBuzz(10);
24+
25+
}
26+
1927
}

0 commit comments

Comments
 (0)