diff --git a/main.cpp b/main.cpp index 5411e7a..4c533e3 100644 --- a/main.cpp +++ b/main.cpp @@ -16,10 +16,14 @@ int main() cout << "Addition: " << x + y << endl; cout << "Subtraction: " << x - y << endl; cout << "Multiplication: " << x * y << endl; - cout << "Division: " << x / y << endl; + if(y == 0) { + std::cout << "Dividing by zero is ot a number.\n"; + } else { + std::cout << "Division: " << x / y << std::endl; + } cout << "Remainder: " << x % y << endl; cout << "Square Root: " << sqrt(x) << endl; cout << "Square: " << pow(x, y) << endl; return 0; -} +} \ No newline at end of file