Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   "a" to the power of "b" (http://www.alice.org/community/showthread.php?t=7668)

SammeStar 11-28-2011 02:12 AM

"a" to the power of "b"
 
1 Attachment(s)
Hello,
I have to write a program using recursion so that a robot will tell me the value of "a" raised to the power of "b".

No matter what I do, the program stops and says it has an error when I get to the answer part.

Can anyone help me with the formula?

x2495iiii 11-28-2011 09:30 AM

1 Attachment(s)
Got it.

I deleted 2 lines from the world.power function, though. Your job is to figure out what those lines were.

SammeStar 11-28-2011 12:58 PM

Thank You!!!
 
Thank you so much, I figured it out and it works. Yay, I won't fail.

x2495iiii 11-28-2011 01:31 PM

Glad to hear it.


All times are GMT -5. The time now is 03:02 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.