Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fizz_buzz;
- public class ball_clock_calc {
- public void main(String[] args){
- for(int i=0; i<=100; i++){
- if (i%3==0 && i%5==0){
- System.out.println("fizzbuzz");
- }
- if (i%3==0 && i%5!=0){
- System.out.println("fizz");
- }
- if (i%3!=0 && i%5==0){
- System.out.println("buzz");
- }
- else{
- System.out.println(i);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement