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
2 parents eeabc24 + f04e00c commit 33a3569
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
#include <iostream>
#include <cmath>

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

int main()
{
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;
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 != 0)
cout << "Division: " << x / y << endl;
std::cout << "Division: " << x / y << std::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;
std::cout << "Dividing by zero is not a number." << 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;

return 0;
}

0 comments on commit 33a3569

Please sign in to comment.