title: Visual Studios 2010: 'File location'.exe is not recognized as internal or external command... (C program)
body: <p>My Thermo professor assigned our class a computational project in which we have to calculate some thermodynamic functions. He provided us with some code to work off of which is a program that essentially finds the area under a curve between two points for the function x^2. The code is said to be correct and it looks correct to me. However, I've been having FREQUENT problems with all of my programs giving me the error "'File location'.exe is not recognized as internal or external command, operable programs or batch files." upon initial running of a project or [mostly] reopening projects.</p>
  
  <p>I've been researching the problem for many hours. I tried adjusting the environmental variables like so many other sites suggested, but I'm either not doing it right or it's not working. All I keep reading about is people explaining the purpose of an .exe file and that I have to locate that file and open that. The problem is that I cannot find ANY .exe file. There is the project I created with the source.c file I created and wrote the program in. Everything else has lengthy extensions that I've never seen before.</p>
  
  <p>I'm growing increasingly impatient with Visual Studios' inconsistent behavior lately. I've just made the switch from MATLAB, which although is an inferior programming language, is far more user friendly and easier to program with. For those of you interested in the code I'm running, it is below:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;math.h&gt;
  
  using namespace std;
  double integration();
  
  double integration()
  {
      int num_of_intervals = 4, i;
      double final_sum = 0, lower_limit = 2, upper_limit = 3, var, y = 1, x;
  
      x = (upper_limit - lower_limit) / num_of_intervals; // Calculating delta x value
  
      if(num_of_intervals % 2 != 0) //Simpson's rule can be performed only on even number of intervals
      {
          printf("Cannot perform integration. Number of intervals should be even");
          return 0;
      }
  
      for(i = 0 ; i &lt; num_of_intervals ; i++)
      {
          if(i != 0) //Coefficients for even and odd places. Even places, it is 2 and for odd it is 4.
          {
              if(i % 2 == 0)
                  y = 2;
  
              else
                  y = 4;
          }
  
          var = lower_limit + (i * x);// Calculating the function variable value
          final_sum = final_sum + (pow(var, 2) * y); //Calculating the sum
      }
  
      final_sum = (final_sum + pow(upper_limit , 2)) * x / 3; //Final sum
      return final_sum;
  }
  
  int main()
  {
      printf("The integral value of x2 between limits 2 and 3 is %lf \n" , integration());
      system("PAUSE");
      return 0;
  }
  </code></pre>
  
  <p>Thanks in advance,</p>
  
  <p>Dom</p>