title: a c program that converts decimal to 36 different bases but there's a simple error
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;math.h&gt;
  
  long int input;
  long int base, exponent;
  
  void convert(long int x,long int y)
  {
      input = x;
      base = y;
  
      while (input &gt; 0){
          exponent = floor(log(input)/log(base));
          input = input - pow(base, exponent);
      }
  }
  
  int main(void){
      scanf("%d", &amp;input);
      scanf("%d", &amp;base);
      convert(input, base);
  }
  </code></pre>
  
  <p>I was trying to compile the code above to see if I can convert decimal into different bases, but I get the following error:</p>
  
  <pre><code>assignment2.c(14): error C2143: syntax error : missing ';' before 'type'
  </code></pre>
  
  <p>I have been struggling for hours, but I have no idea what this is referring to. How can I fix this?</p>
  
  <p>EDIT: this is the whole message</p>
  
  <pre><code>1&gt;------ Build started: Project: assignment2, Configuration: Debug Win32 ------
  1&gt;Build started 2012-04-27 오후 5:45:10.
  1&gt;InitializeBuildStatus:
  1&gt;  Touching "Debug\assignment2.unsuccessfulbuild".
  1&gt;ClCompile:
  1&gt;  assignment2.c
  1&gt;c:\users\조화수\documents\visual studio 2010\projects\assignment2\assignment2\assignment2.c(14): error C2143: syntax error : missing ';' before 'type'
  1&gt;  assign2.c
  1&gt;c:\users\조화수\documents\visual studio 2010\projects\assignment2\assignment2\assign2.c(13): warning C4244: '=' : conversion from 'double' to 'long', possible loss of data
  1&gt;c:\users\조화수\documents\visual studio 2010\projects\assignment2\assignment2\assign2.c(14): warning C4244: '=' : conversion from 'double' to 'long', possible loss of data
  1&gt;c:\users\조화수\documents\visual studio 2010\projects\assignment2\assignment2\assign2.c(19): 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\microsoft visual studio 10.0\vc\include\stdio.h(304) : see declaration of 'scanf'
  1&gt;c:\users\조화수\documents\visual studio 2010\projects\assignment2\assignment2\assign2.c(20): 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\microsoft visual studio 10.0\vc\include\stdio.h(304) : see declaration of 'scanf'
  1&gt;  Generating Code...
  1&gt;
  1&gt;Build FAILED.
  1&gt;
  1&gt;Time Elapsed 00:00:02.98
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>