diff options
Diffstat (limited to '5p24.cpp')
-rw-r--r-- | 5p24.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/5p24.cpp b/5p24.cpp new file mode 100644 index 0000000..d8a7bc9 --- /dev/null +++ b/5p24.cpp @@ -0,0 +1,21 @@ +#include <iostream> + +/* + * + * 5.24 + * + * + */ + +int main () { + + int a = 0; + int b = 0; + std::cin >> a >> b; + if(b == 0) { + throw std::runtime_error("You cannot divide by 0!"); + } + + std::cout << a / b << std::endl; + return 0; +} |