I need to know how can i get quotient and residue from a division executing just one operation, using python or c++.
Advertisement
Answer
quotient, reminder = divmod(10, 3) print(quotient, reminder) # 3 1
I need to know how can i get quotient and residue from a division executing just one operation, using python or c++.
quotient, reminder = divmod(10, 3) print(quotient, reminder) # 3 1