title: Error: format %d expects type int, but argument 2 has type double(*)(int, int)
body: <p>I can't seem to figure out this error in my printf statements..Whenever I change the format specifier from integer to float and vice versa, I just get the same error.</p>
  
  <pre><code>     error: format â%fâ expects type âdoubleâ, but argument 2 has type âdouble (*)(int,     int)â
  </code></pre>
  
  <p>Here is that part in my code</p>
  
  <pre><code>void outputScores(int x, int y)
  {
  if(((x&amp;y)&gt;=1) &amp;&amp; ((x&amp;y)&lt;=20))
  {
  printf("------------------------------\n");
  printf("\n");
  printf("Field: %d,%d\n",x,y);
  printf("\n");
  printf("Soil quality: %f\n",soilQuality);
  printf("Sun exposure: %d\n",sunExposure);
  printf("Irrigation exposure: %d\n",irrigationExposure);
  printf("\n");
  printf("Estimated yield: %d\n",estimatedYield);
  printf("Estimated quality: %d\n",estimatedQuality);
  printf("Time to harvest: %d\n",harvestTime);
  printf("\n");
  printf("Overall Score: %f\n",fieldScore);
  printf("\n");
  printf("------------------------------\n");
  }
  else
  {
  printf("Field %d, %d is invalid!\n",x,y);
  }
  return;
  }
  </code></pre>
  
  <p>and here is the function</p>
  
  <pre><code> double soilQuality(int x, int y)
   {
   if((x&gt;=1) &amp;&amp; (x&lt;=20) &amp;&amp; (y&gt;=1) &amp;&amp; (y&lt;=20))
   {
   if((x+y)%2==1)
   {
   int soilQuality=(1+(sqrt((x-10)*(x-10))+((y-10)*(y-10))));
   return soilQuality;
   }
   else
   {
   int soilQuality=(1+((abs(x-10)+abs(y-10))/2));
   return soilQuality;
   }
   }
   else
   {
   return -1;
   }
   }
  </code></pre>