Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Basic Java Homework Debug

How can I debug the following code?

```import java.util.Scanner;

public class Fizzbuzz {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

System.out.print("Choose a number? ");
int number = in.nextInt();

if(number % 7 == 0 || number % 11 == 0)
{
System.out.println("Fizz");
}
else if(number % 13 == 0)
{
System.out.println("Buzz");
}
else
{
System.out.println("Fizzbuzz");
}
}
}
```

Here are my instructions:

Variant of FizzBuzz:

Read an integer from standard input. If number is divisible by 7 or 11, print "Fizz". Otherwise, if number is divisible by 13, print "Buzz". Otherwise, print "FizzBuzz". The output should be only "Fizz", "Buzz", or "FizzBuzz".

Note: an integer x is "divisible" by y whenever x % y == 0, e.g., x % 13 == 0