Mega Code Archive
Make the result of integer division a float
#include
using namespace std;
int main(void)
{
int firstOp = 10, secondOp = 4;
float result = (float) firstOp / secondOp;
cout << firstOp << " / " << secondOp << " = " << result;
return 0;
}