title: Having trouble with return values for user-defined Functions
body: <p>I'm doing a simple Pythagorean function
  User inputs two numbers, both numbers are shipped off to a user-defined function called Hypo, and hypo's supposed to return one value, C, which is the answer. </p>
  
  <p>Here's my script. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;math.h&gt;
  
  int hypo(double a, double b);
  
  int main(void)
  { 
     double one, two;
     //user inputs two variables
     scanf("%lf %lf", &amp;one, &amp;two );
     printf("Your C number is: %.2lf\n", hypo(one, two));
  
     system("PAUSE"); 
     return 0;
  }
  
  /*-------------------------------------------------------------------------*/
  
  int hypo(double a, double b)
  {
      double c;
      c = sqrt((a*a)+(b*b));
      printf("Currently, A = %.2lf, and B = %.2lf, C = %.2lf\n", a, b, c);
  
      return c;
  }
  </code></pre>
  
  <p>On my computer, it works all the way until the end, Return c; which for some reason, returns the value 0 to the Main function. (I tested to see just where the error was, hence the printscreening in the hypo function.)</p>
  
  <p>I want to understand this. </p>
  
  <p>I'm pretty sure I have the synax wrong, or there's something I didn't read yet that's gone over my head, but after an hour of looking through books and checking youtube videos, I don't understand why this isn't working. </p>
  
  <p>EDIT: </p>
  
  <p>Thank you all for the fast replies! I changed it to a double, (realizing my mistake in the process too xD ) and it works like a charm now. 
  Very happy with how fast you guys all answered, I'll be sure to pass it forward :)</p>