123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * Write a description of class FizzBuzz here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class FizzBuzz
  8. {
  9. public String run(int x){
  10. String answer ="";
  11. if (x % 3 == 0){
  12. answer = "Fizz";
  13. }
  14. return answer;
  15. }
  16. public String divide(int x){
  17. String anw = "";
  18. if (x % 5 == 0){
  19. anw = "Buzz";
  20. }
  21. return anw;
  22. }
  23. public String blabla(int x){
  24. String anw ="";
  25. if (x % 3 ==0 & x % 5 ==0){
  26. anw = "FizzBuzz";
  27. }
  28. return anw;
  29. }
  30. }