summaryrefslogtreecommitdiff
path: root/3/5_arith_and_logic/remdiv.c
diff options
context:
space:
mode:
Diffstat (limited to '3/5_arith_and_logic/remdiv.c')
-rw-r--r--3/5_arith_and_logic/remdiv.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/3/5_arith_and_logic/remdiv.c b/3/5_arith_and_logic/remdiv.c
new file mode 100644
index 0000000..8d3c957
--- /dev/null
+++ b/3/5_arith_and_logic/remdiv.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+
+void remdiv(long x, long y, long *qp, long *rp) {
+ long q = x/y;
+ long r = x%y;
+ *qp = q;
+ *rp = r;
+}
+
+int main() {
+ remdiv(0,0,0,0);
+}