diff --git a/main.cpp b/main.cpp index 47b917d..cc845ac 100644 --- a/main.cpp +++ b/main.cpp @@ -19,5 +19,12 @@ int main(){ cout<< "Multiplication: "<< first << "*" << second << "="; cout<< (first*second) << endl; + if (second == 0){ + cout<< "Division: Error - cannot divide by zero!" << endl; + } else { + cout<< "Division: "<< first << "/" << second << "="; + cout<< (first/second) << endl; + } + return 0; } \ No newline at end of file