title: Floating Point Exception C++ Why and what is it?
body: <p>I'm building a program for the Euler projects question 3, and while that might not really matter as a result I'm current trying to make this code take a number and test if it is prime or not. Now then before I get to troubleshoot the function it gives me the error "floating point exception" right after inputting the number. Here's the code:</p>
  
  <pre><code>int main()
  {
      int input;
      cout &lt;&lt; "Enter number: " &lt;&lt; endl;
      cin&gt;&gt; input;
      int i = input/2;
      int c;
      for (i&gt;0; i--;) {
          c= input%i;
          if (c==0 || i == 1)
              cout &lt;&lt; "not prime" &lt;&lt; endl;
          else
              cout &lt;&lt; "prime" &lt;&lt; endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>so essentially why is it giving me a floating point exception and what does that even mean?</p>