I know, I didnt use that, I used the first method. I only posted it to show how I would get the same answer as the previous method. Because the question stated the method to be in the form num =...
Type: Posts; User: ShakeyJakey
I know, I didnt use that, I used the first method. I only posted it to show how I would get the same answer as the previous method. Because the question stated the method to be in the form num =...
Yea i only read that after i used the first method. This is how i done it the other way
import java.math.*;
class PowersAlt{
static int pow(int num, int power){
int x =...
Thanks alot i solved it just there with all of your help :) It was just a small question out of an exercise sheet that confused me and I hate moving on and leaving questions unsolved. Incase you were...
Thanks for your reply :). Ive tried working it by what you've said. This is what i have so far
class Powers{
static int getPower(int num, int power){
if(power==1){
num = num;
}...
Jake here, im new to this forum, im also new to java and recently got a bit stuck in a programming exercise for my module. I know it'll probably be really easy to some people but i thought id share...