Skip to content

Commit

Permalink
resolved ChicoState#61
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelrsandoval committed Aug 30, 2023
1 parent f04e00c commit 5e6f985
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@

int main()
{
cout<<"Hi, please enter two whole numbers: ";
std::cout<<"Hi, please enter two whole numbers: ";

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;
if (y == 0)
std::cout << "Dividing by zero is not a number." << std::endl;
else
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;
Expand Down

0 comments on commit 5e6f985

Please sign in to comment.