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
24 changes: 12 additions & 12 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@

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

int x,y;
int x,y;

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;
std::cout << "Division: " << x / y << std::endl;
std::cout << "Remainder: " << x % y << std::endl;
std::cout << "Square Root: " << sqrt(x) << std::endl;
std::cout << "Square: " << pow(x, y) << std::endl;
std::cin >> x >> y;
std::cout << x << "+" << y << "=" << x + y << std::endl;
std::cout << x << "-" << y << "=" << x - y << std::endl;
std::cout << x << "*" << y << "=" << x * y << std::endl;
std::cout << x << "/" << y << "=" << x / y << " with remainder of " << x % y << std::endl;
std::cout << "Square Root: Square root of " << x << " is " << sqrt(x) << std::endl;
std::cout << "Square Root: Square root of " << y << " is " << sqrt(y) << std::endl;
std::cout << x << "^" << y << "=" << pow(x, y) << std::endl;

return 0;
return 0;
}