0
What does the // do in python and c++?
2 Answers
0
In python, the double forward slash is used when you want the result of a mathematical calculation as an integer and not as float e.g.
7/6 = 1.1666666666667
then
7//6 = 1 (it truncates the result)
BTW, that's python 3. Not sure about its function in C++.
0
In C++ it is used for comments.