# Thread: Devise an algorithm

1. ## Devise an algorithm

Devise an algorithm to compute x^n, where x is a real number and n is an integer.

I feel like I have asked a lot of questions lately, but I am just trying to understand. I am taking this course independently and do not have anyone to ask my questions to.

Can someone please explain this to me???

2. Originally Posted by sjenkins
Devise an algorithm to compute x^n, where x is a real number and n is an integer.

I feel like I have asked a lot of questions lately, but I am just trying to understand. I am taking this course independently and do not have anyone to ask my questions to.

Can someone please explain this to me???
You are going to multiply $x$ by itself $n$ times. That is:

$
\underbrace {x \times x \ldots \times x}_{{\rm n}\;{\rm times}}
$

RonL