title: Why do I get, variable is not initialized error?
body: <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  void Calculator(); 
  
  void main() 
  {
      Calculator(); 
      getch();
  } 
  
  void Calculator() 
  {
   int n,j;
   char f1;
   double t;
   printf(&quot;please enter two numbers&quot;);
   scanf(&quot;%d%d&quot;,&amp;n,&amp;j);
   printf(&quot;please enter the syboml you want ( * / + or -)&quot;);
   scanf(&quot;%c&quot;,&amp;f1);
   if( f1 == '+')
      t = n + j;
   if (f1 == '-')
      t = n-j;
   if (f1 == '*')
      t = n*j;
   if (f1 == '/')
      t = n/j;
   printf(&quot;%f&quot; ,t);
  }
  </code></pre>