Skip to content

Commit

Permalink
resolved ChicoState#61
Browse files Browse the repository at this point in the history
  • Loading branch information
jduron1 committed Aug 30, 2023
1 parent 48adf7f commit eeabc24
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ using std::endl;

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

int x,y;
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;
cin >> x >> y;
cout << "Addition: " << x + y << endl;
cout << "Subtraction: " << x - y << endl;
cout << "Multiplication: " <<x * y << endl;
if (y != 0)
cout << "Division: " << x / y << endl;
else
cout << "Dividing by zero is not a number." << endl;
cout << "Remainder: " <<x % y << endl;
cout << "Square Root: " << sqrt(x) << endl;
cout << "Square: " << pow(x, y) << endl;

return 0;
return 0;
}

0 comments on commit eeabc24

Please sign in to comment.