diff options
feat(Week04): Add exercises and solutions
1 files changed, 15 insertions, 0 deletions
| -rw-r--r-- | Week04/Exercise08.cpp | 15 |
diff --git a/Week04/Exercise08.cpp b/Week04/Exercise08.cpp new file mode 100644 index 0000000..052dab9 --- /dev/null +++ b/Week04/Exercise08.cpp @@ -0,0 +1,15 @@ +#include <iostream> + +int main() { + unsigned int a, x; + std::cin >> a >> x; + + unsigned int product = 1; + for (unsigned int power = 1; power <= x; power++) { + product *= a; + } + + std::cout << product; + + return 0; +} |
