Skip to content

Commit

Permalink
Add day1 code (#168)
Browse files Browse the repository at this point in the history
* Add day1 code

* Update fizzbuzz_bipsa98.java
  • Loading branch information
bipsa98 authored and MadhavBahl committed Jan 14, 2019
1 parent 9ecfd1b commit e5382a7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Day1/Java/fizzbuzz_bipsa98.java
@@ -0,0 +1,23 @@

/*
@author bipsa nayak
date: 13/01/19
*/
import java.util.*;
public class FizzBuzz{

public static void main(String []args)
int n=15;int i;
for(i=1;i<=n;i++)
{
if (i%3 == 0 && i%5 == 0)
System.out.println("FizzBuzz");
else if(i%3 == 0)
System.out.println("Fizz");
else if (i%5 == 0)
System.out.println("Buzz");
else
System.out.println(i);
}
}
}

0 comments on commit e5382a7

Please sign in to comment.