title: C program won't compile
body: <p>I'm taking intro to programming and i have a professor who isn't very involved. Unfortunately the class is full of novices like myself, so no help there. I have to create a tax calculator only using input/output, assignment statements, and arithmetic. My friend actually helped me fix the code up a bit and compiled it before sending it to me. I didn't change anything, yet it won't work for me.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main()
  {
      const double TAX_RATE = 0.075;
      double item1 = 0, item2 = 0, item3 = 0;
  
      printf("Enter the price of the first item: \n");
      scanf("%lf", &amp;item1);
  
      printf("You entered %.2lf \n", item1);
      printf("Enter the price of the second item: \n");
      scanf("%lf", &amp;item2);
  
      printf("You entered %.2lf \n", item2);
      printf("Enter the price of the third item: \n");
      scanf("%lf", &amp;item3);
  
      double total = item1 + item2 + item3;
      double tax = total * TAX_RATE;
      double totalWithTax = total + tax;
  
      printf("You entered %.2lf \n", item3);
      printf("The total of your items is %.2lf \n", total);
      printf("The tax is %.2lf \n", tax);
      printf("The total with tax is %.2lf \n", totalWithTax);
  
      system("pause");
  
  }
  </code></pre>
  
  <p>Here's the output</p>
  
  <pre><code>1&gt;------ Build started: Project: assign2, Configuration: Debug Win32 ------
  1&gt;  program.c
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(10): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdio.h(304) : see declaration of 'scanf'
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(14): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdio.h(304) : see declaration of 'scanf'
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(18): warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
  1&gt;          c:\program files (x86)\microsoft visual studio 10.0\vc\include\stdio.h(304) : see declaration of 'scanf'
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(20): error C2143: syntax error : missing ';' before 'type'
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(21): error C2143: syntax error : missing ';' before 'type'
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(22): error C2143: syntax error : missing ';' before 'type'
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(25): error C2065: 'total' : undeclared identifier
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(26): error C2065: 'tax' : undeclared identifier
  1&gt;c:\users\chris\documents\visual studio 2010\projects\assign2\assign2\program.c(27): error C2065: 'totalWithTax' : undeclared identifier
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>