yea whoops, really botched that one as i was in a rush, sorry about that. Glad the OP figured it out, I edited my post just in case for future references tho.
Type: Posts; User: shiftasterisk
yea whoops, really botched that one as i was in a rush, sorry about that. Glad the OP figured it out, I edited my post just in case for future references tho.
First lets change your variables to something more descriptive
Scanner kb = new Scanner(System.in);
int base = kb.nextInt();
int exponent = kb.nextInt();
Alright so...
Alright so I've come up to this point and now I'm getting a stackoverflow error which I was assuming I'd have at some point or another. Thanks again for the help.
import java.util.Stack;...
There only needs to be 1 for loop. Once you collected base 'b' and exponent 'e', the for loop would run from x = 1 to x<= e. Inside the for loop just print out b and b^x.
Oh yea, sorry about that. I just woke up and will start working on it soon.
Hey everyone,
Ok, so I have to write this program that solves the Cracker Barrel puzzle aka Triangular Peg Solitaire. For more background info about the puzzle you can check out (George Bell's...