You are viewing a single comment's thread. Return to all comments →
public class HelloWorld{
public static void main(String []args){ int i=1; for(i=1;i<=100;i++) { if(i%3==0 && i%5!=0) System.out.println("\nFizz"); else if(i%5==0 && i%3!=0) System.out.println("\nBuzz"); else if(i%3==0 && i%5==0) System.out.println("\nFizzBuzz"); else System.out.println(i); } }
}
whats wrong in this ??
Seems like cookies are disabled on this browser, please enable them to open this website
FizzBuzz
You are viewing a single comment's thread. Return to all comments →
public class HelloWorld{
}
whats wrong in this ??