A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

pottersheep

  • 4 years ago

Guidance please !! Write a method to calculates exponents. Pass 2 values: the number and the exponent it is to be calculated to; return the result. Display the returned value.

  • This Question is Closed
  1. pottersheep
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    This is the fail I have now :((( http://pastebin.com/AMiaBFDR

  2. pottersheep
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    please :(

  3. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    the return result on line 25 should be after the while loop. Your method is returning immediately and always returning 1. Also you should probably get used to making result a local variable to the function and not a static class variable.

  4. pottersheep
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    THanks

  5. anonymous
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    I have already helped you and pointed out all your mistakes

  6. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.