// Prevent a division by zero using the ?.
// the ternary operator
// involves THREE operands
class NoZeroDiv
{
  public static void main(String[] args)
  {
    int result;

    for(int i = -5; i < 6; i++)
    {
      // if ... either  or
      // if true that result not equal 0, then 100/i, else 0
      result = i != 0 ? 100 / i : 0;
      if(i != 0)
      {
        System.out.println("100 / " + i + " is " + result);
	  }
	  else
	  {
		  System.out.println("result = 0 so let's not do division");
		  System.out.println("The value of result is now: " + result);
	  }


    }
  }
}
