Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include <iostream>
#include <cmath>

using std::endl;
using std::cin;
using std::cout;
using endl;
using cin;
using cout;

int main()
{
Expand All @@ -12,6 +12,7 @@ int main()

int x,y;

<<<<<<< HEAD
cin >> x >> y;
cout << "Addition: " << x + y << endl;
cout << "Subtraction: " << x - y << endl;
Expand All @@ -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;
}