SyntaxFix
Write A Post
Hire A Developer
Questions
Cast the operands to floats:
float ans = (float)a / (float)b;