Skip to content
Closed
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
30 changes: 18 additions & 12 deletions main.cpp
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
#include <iostream>
#include <cmath>

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

int main()
{
cout << "Hi, please enter two whole numbers: ";
cout << "This is Kevin!\n";
cout<<"Hi, please enter two whole numbers: ";

int x,y;

cin >> x >> y;
cout << "Addition: " << x + y << endl;
cout << "Subtraction: " << x - y << endl;
cout << "Multiplication: " << x * y << endl;
cout << "Division: " << x / y << endl;
cout << "Remainder: " << x % y << endl;
cout << "Square Root: " << sqrt(x) << endl;
cout << "Square: " << pow(x, y) << endl;
std::cin >> x >> y;
std::cout << "Addition: " << x + y << std::endl;
std::cout << "Subtraction: " << x - y << std::endl;
std::cout << "Multiplication: " <<x * y << std::endl;
if(y)

std::cout << "Division: " << x / y << std::endl;

else

cout << "Dividing by zero is not a number." << endl;

std::cout << "Remainder: " <<x % y << std::endl;
std::cout << "Square Root: " << sqrt(x) << std::endl;
std::cout << "Square: " << pow(x, y) << std::endl;

return 0;
}