DanielHabib / terminal-based-comp-sci-quiz

Terminal Based Computer Science assessment
28 stars 9 forks source link

Integer Division Prompt isn't correct #7

Closed DanielHabib closed 7 years ago

DanielHabib commented 8 years ago

Again thanks to reddit user djimbob

"prompt": "What is the difference between integer division and regular division",
"answer": "integer division is equal to using regular division and then flooring to the nearest integer"
The definition of integer division varies by programming language, and is not always regular division and then floor. Try say (-1)/5 in C, and compare to floor(-0.2).