Answers for "real division in C ++"

C++
3

c++ integer division

// truncates decimal
cout << 20.0 / 3; // 6.66667 
cout <<   20 / 3; // 6
cout <<  -20 / 3; // -6
Posted by: Guest on December-13-2020

Browse Popular Code Answers by Language