﻿# V609\. Possible division or mod by zero\.

The analyzer has detected a situation when division by zero may occur\. 

Consider this sample:

```cpp
for (int i = -10; i != 10; ++i)
{
  Foo(X / i);
}
```

While executing the loop, the 'i' variable will acquire a value equal to 0\. At this moment, an operation of division by zero will occur\. To fix it we need to specifically handle the case when the 'i' iterator equals zero\.

This is the correct code:

```cpp
for (int i = -10; i != 10; ++i)
{
  if (i != 0)
    Foo(X / i);
}
```