File tree 6 files changed +310
-773
lines changed
6 files changed +310
-773
lines changed Original file line number Diff line number Diff line change 298
298
"contributions" : [
299
299
" code"
300
300
]
301
- },
301
+ },
302
302
{
303
303
"login" : " gaurav01k3" ,
304
304
"name" : " GAURAV KUMAR" ,
307
307
"contributions" : [
308
308
" doc" ,
309
309
" code"
310
- ]
311
- }
310
+ ]
311
+ },
312
+ {
313
+ "login" : " wboccard" ,
314
+ "name" : " wboccard" ,
315
+ "avatar_url" : " https://avatars3.githubusercontent.com/u/72316984?v=4" ,
316
+ "profile" : " https://github.com/wboccard" ,
317
+ "contributions" : [
318
+ " doc" ,
319
+ " code"
320
+ ]
321
+ }
312
322
]
313
323
}
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ /*
2
+ * @author wboccard
3
+ * @date October 7, 2020
4
+ */
5
+
6
+ public class FizzBuzz_wb {
7
+
8
+ public static void main (String [] args ){
9
+ int repetitions = 50 ;
10
+ for (int index = 1 ; index <= repetitions ; index ++){
11
+ if (index % 3 == 0 && index % 5 == 0 ){
12
+ System .out .print ("FizzBuzz" );
13
+ } else if (index % 3 == 0 ){
14
+ System .out .print ("Fizz" );
15
+ } else if (index % 5 == 0 ){
16
+ System .out .print ("Buzz" );
17
+ } else {
18
+ System .out .printf ("%d" , index );
19
+ }
20
+ if (index != repetitions ){
21
+ System .out .print (", " );
22
+ } else {
23
+ System .out .println ();
24
+ }
25
+ }
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -149,6 +149,36 @@ class FizzBuzzPrabhatTest {
149
149
}
150
150
}
151
151
```
152
+ ### [ Solution 3] : (./Java/FizzBuzz_wb.java)
153
+ ``` java
154
+ /*
155
+ * @author wboccard
156
+ * @date October 7, 2020
157
+ */
158
+
159
+ public class FizzBuzz_wb {
160
+
161
+ public static void main (String [] args ){
162
+ int repetitions = 50 ;
163
+ for (int index = 1 ; index <= repetitions; index++ ){
164
+ if (index % 3 == 0 && index % 5 == 0 ){
165
+ System . out. print(" FizzBuzz" );
166
+ } else if (index % 3 == 0 ){
167
+ System . out. print(" Fizz" );
168
+ } else if (index % 5 == 0 ){
169
+ System . out. print(" Buzz" );
170
+ } else {
171
+ System . out. printf(" %d" , index);
172
+ }
173
+ if (index != repetitions){
174
+ System . out. print(" , " );
175
+ } else {
176
+ System . out. println();
177
+ }
178
+ }
179
+ }
180
+ }
181
+ ```
152
182
153
183
## C Implementation
154
184
You can’t perform that action at this time.
0 commit comments