Power of "number" accumulating in an Array
<p>I got a formula in a program that depends on accumulating the power of a number inside an array. I registered this on other pages, but its not what I need :</p>

<pre><code>   #include &lt;stdio.h&gt;
   #include &lt;math.h&gt;
   int main (){
   int x, y, powernumber;
   scanf ("%d %d",&amp;x,&amp;y);
   powernumber = pow(x,y);
   printf ("Powernumber = %d",powernumber);
   return 0;}
</code></pre>

<p>its ok, but I have to assign a slot for each powernumber.</p>

<p>The issue at hand is this:</p>

<pre><code>   int array [100];
   int i, int1;

   scanf ("%d",&amp;int1);
   for (i=0; i&lt;=100; i++)
   {array [i] = 1 / pow(2, int1); // &lt;-----------------ERROR
   printf ("%d %d\n",i+1,array [i]);}
   return 0;}
</code></pre>

<p>The point of the formula, is that the user types in a number, and this number is to be accumulated as a powernumber, each time the loop makes a round, until the loop is terminated at i=100. lets say the user enters the number 3. the first time the program performs 2^3, then the next time 2^4, and then 2^5, in an array. It works with the ordinary operators like Multiplication and Division, but not the Power number. The example above is a stripped version, so it might work on a compiler. but hopefully the question is understandable .</p>