diff --git a/main.cpp b/main.cpp index 5411e7a3..f410e472 100644 --- a/main.cpp +++ b/main.cpp @@ -1,9 +1,9 @@ #include #include -using std::endl; -using std::cin; -using std::cout; +using endl; +using cin; +using cout; int main() { @@ -12,6 +12,7 @@ int main() int x,y; +<<<<<<< HEAD cin >> x >> y; cout << "Addition: " << x + y << endl; cout << "Subtraction: " << x - y << endl; @@ -20,6 +21,25 @@ int main() cout << "Remainder: " << x % y << endl; cout << "Square Root: " << sqrt(x) << endl; cout << "Square: " << pow(x, y) << endl; + if ( y== 0) { + + std::cout << "Dividing by zero is not a number.\n"; + + } else{ + + std::cout << "Division: " << x/y << endl; + } + +======= + cin >> x >> y; + cout << "Addition: " << x + y << endl; + cout << "Subtraction: " << x - y << endl; + cout << "Multiplication: " << x * y << endl; + cout << "Division: " << x / y << endl; +>>>>>>> main + cout << "Remainder: " << x % y << endl; + cout << "Square Root: " << sqrt(x) << endl; + cout << "Square: " << pow(x, y) << endl; return 0; }