title: How to call a local variable from another function c
body: <p>I am new to programming. I would like to call from functions(first, second, third the variables in function "enter" and in function "math" accordingly).</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;math.h&gt;
  
  void math (void);
  void first (void);
  void second (void);
  void third (void);
  void enter(void);
  void scan(void);
  
  
  int main() 
  {
  
   first();  //function
   second(); //function
   third();  //function
   enter();  //function
   printf("\n\n Would you like to edit? (Y/N)\n\n");
   scan();   //function
   return(0);
  }
  </code></pre>
  
  <p>Here is the user input: </p>
  
  <pre><code>void first (void){
  float a;
  printf("Enter First number: ");
  scanf("%f",&amp;a);
   }
  
   void second (void){
   float b;
   printf("Enter Second number: ");
   scanf("%f",&amp;b);
    }
  
    void third (void){
    float c;
    printf("Enter Third number: ");
    scanf("%f", &amp;c );
    }
  </code></pre>
  
  <p>How can I call the variables from the user input to the function below?</p>
  
  <pre><code>  void enter(){
    float a,b,c;
    printf("you have entered a: %f, b: %f, c:%f", a,b,c);
       }
  </code></pre>
  
  <p>This is the loop in case the user would like to edit or continue with the initial  input numbers. </p>
  
  <pre><code>    void scan(void){
      int ch;
      scanf("%d", &amp;ch);
      if (ch==1){
          main();
  
          }else{
          math();
          }
          }
  </code></pre>
  
  <p>Here I would also like to call the input variables from function (first, second third) in order to perform some math calculations. </p>
  
  <pre><code>        void math (void){
             float a,b,c;
             float x,y,z;
             x=a+b+c;
             y= powf(x,2);
             z=sqrt(y);
  
             printf("Final Result of Addition is: %f \n Final Result of 
             Multiplication is: %f \n Final Result of squareroot  is:%f\n 
             ",x,y,z);
                            }
  </code></pre>