title: Floating point exception error in simple c++ code
body: <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main() {
      // your code goes here
      int t,x,y,z,set,i,check=0;
      cin&gt;&gt;t;
      while(t--)
      {
          cin&gt;&gt;x&gt;&gt;y&gt;&gt;z;
          
          check=z-(x+y);
         
        for(i=0;i&lt;10;i++){
              if(check%i==0)
              {
                  set=i;
              }
             // i++;
          }
          cout&lt;&lt;set&lt;&lt;endl;
      }
          
      return 0;
  }
  </code></pre>
  <p>While I run this code then I get run time error like</p>
  <blockquote>
  <p>FLoating point exception</p>
  </blockquote>
  <p>and from next input it gives error like:</p>
  <blockquote>
  <p>dash: 2: 4:not found</p>
  </blockquote>