I wrote
double r = 2/3;
cout << "r = " << r << endl;
Then it returns
r = 0
I would like it to show that r = 0.666667 or something like that instead of a 0. Especially I need to use that r = 2/3 to do calculation in my algorithm. How can I fix that?