diff --git a/exple-cmake-build/exple-expr.hpp b/exple-cmake-build/exple-expr.hpp new file mode 100644 index 0000000000000000000000000000000000000000..895a1eee317b42ebbb0cf059829983bc91b109a9 --- /dev/null +++ b/exple-cmake-build/exple-expr.hpp @@ -0,0 +1,12 @@ +#include "exple-add.h" +#include "exple-mul.h" + +namespace exple +{ + int add_and_mul( int a, int b, int c); +} + +int exple::add_and_mul( int a, int b, int c) +{ + return exple::mul(exple::add(a, b), c); +} diff --git a/exple-cmake-build/main.cpp b/exple-cmake-build/main.cpp new file mode 100644 index 0000000000000000000000000000000000000000..acbafd34bd1332c6636f55e173aadc8d20480a2f --- /dev/null +++ b/exple-cmake-build/main.cpp @@ -0,0 +1,14 @@ +#include "exple-expr.hpp" + +#include <stdio.h> + +int main() +{ + + int a = 2; + int b = 3; + int c = 4; + printf("Multiplication of sum of %i and %i by %i is... %i", a, b, c, exple::add_and_mul(2, 3, 4)); + + return 0; +}