Ok... you need to pass an error message if any one of the three is 0...
I don't think it needs to be that complex...

Code:
if ((a == 0) || (b == 0) || (c == 0))
  { printf("Don't enter zeros!\n");
     return 0; }
Does that solve your problem?