This is the problem with simply copying and pasting spoonfed answers. You have to understand what's actually going on if you have any hope of writing code.
You've actually copied from two different sources, which leads me to believe that you're "shotgun debugging"- changing random things and hoping for the best, again without understanding what's actually going on.
What do you think this line does:
Your n1 variable is an int. Your in variable is a Scanner. What are you actually trying to do here? Consult the API for useful functions.
And what do you think these lines do, from your original source, which seems to be different from the source of the error:
String roar=in.nextLine();
int n1= roar;
Again, n1 is an int. Your roar variable is a String. Why do you think this would work?
Honestly, I'd suggest going back to the basic tutorials and taking the time to read through them instead of trying to hack together various spoonfed answers you've received from the internet.