I have this code in my program: (I included the cout statements for debugging purposes)
cout << "b: " << b << "\na: " << a;
constant[0] = (-b / (2 * a));
cout << "\nconstant: " << constant[0] << endl;
The output I get is:
b: -4
a: 3
constant: 0
Whereas I'm trying to make constant[0] equal to -(-4)/(2 * 3), or 0.6666... What am I doing wrong with the formula I put there?