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
28 changes: 26 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
#include <iostream>
#include <cmath>
using std::cin;
using std::cout;
using std::endl;

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

int main()
{
<<<<<<< HEAD
cout << "THE FIRST EXAMPLE MATH DISPLAY!\n";
cout << "Hi, please enter two whole numbers: ";
=======
cout << "THE FIRST EXAMPLE MATH DISPLAY!\n";
cout << "Hi, please enter two whole numbers: ";
>>>>>>> main

int x,y;
int x,y;

<<<<<<< HEAD
cin >> x >> y;
cout << "Addition: " << x + y << endl;
cout << "Subtraction: " << x - y << endl;
cout << "Multiplication: " << x * y << endl;
if ( y== 0 ) {
cout << "Divding by zero is niot a number\n";
}
else {
cout << "Division: " << x / y << endl;
}
cout << "Remainder: " << x % y << endl;
cout << "Square Root: " << sqrt(x) << endl;
cout << "Square: " << pow(x, y) << endl;
=======
cin >> x >> y;
cout << "Addition: " << x + y << endl;
cout << "Subtraction: " << x - y << endl;
Expand All @@ -20,6 +43,7 @@ int main()
cout << "Remainder: " << x % y << endl;
cout << "Square Root: " << sqrt(x) << endl;
cout << "Square: " << pow(x, y) << endl;
>>>>>>> main

return 0;
return 0;
}