Skip to content

Commit e5382a7

Browse files
bipsa98MadhavBahl
authored andcommitted
Add day1 code (#168)
* Add day1 code * Update fizzbuzz_bipsa98.java
1 parent 9ecfd1b commit e5382a7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Day1/Java/fizzbuzz_bipsa98.java

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
/*
3+
@author bipsa nayak
4+
date: 13/01/19
5+
*/
6+
import java.util.*;
7+
public class FizzBuzz{
8+
9+
public static void main(String []args)
10+
int n=15;int i;
11+
for(i=1;i<=n;i++)
12+
{
13+
if (i%3 == 0 && i%5 == 0)
14+
System.out.println("FizzBuzz");
15+
else if(i%3 == 0)
16+
System.out.println("Fizz");
17+
else if (i%5 == 0)
18+
System.out.println("Buzz");
19+
else
20+
System.out.println(i);
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)