title: How to calculate inside of function and pass it into main using arrays
body: <p>Currently I am working on some of homework stuff and I got stuck on point where i need to calculate Reciprocal of a Fraction</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void reciprocal (int topnumber[],int botnumber[],float *argument[]);
  
  int main(){
      int topnumber[3],botnumber[3],i,n;
      float argument[3];
  
      for(i=0;i&lt;3;i++){
        printf("Top number of %d fraction\n",i+1);
        scanf("%d",&amp;topnumber[i]);
        printf("Bot number of %d fraction\n",i+1);
        scanf("%d",&amp;botnumber[i]);
      }
      reciprocal(topnumber[i],botnumber[i],&amp;argument[i]);
  }
  
  void reciprocno (int topnumber[],int botnumber[],float *argument[]){
      int i;
      for (i=0;i&lt;3;i++){
        &amp;argument[i] = botnumber[i] / topnumber[i];
        printf("Reciprocal of a Fraction %d / %d is %f\n",topnumber[i],botnumber[i],argument[i]);
      }
  
  }
  </code></pre>
  
  <p>I want it to write Reciprocal of 2/5 is 5/2 = 2.5 and I need it  to be calculated in function and then passed into main function using scanf to collect top and bot numbers with for loop</p>