about | help | code help+videos | done | prefs |
Define a recursive function that when passed two integers, returns their greatest common divisor. This time, you must also cater for negative numbers. greatest_common_divisor(20, -100) → 20 greatest_common_divisor(-72, 48) → 24 greatest_common_divisor(100, -121) → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 2 Post-solution available
Copyright Nick Parlante 2017 - privacy