diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 0000000..7f89e86 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,23 @@ +name: Build C++ + +on: + push: + branches: "**" + pull_request: + branches: [ main ] + +jobs: + install: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y -f build-essential g++ cmake + build: + needs: install + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build project + run: make clean && make \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4c0d885 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +[![Build C++](https://github.com/OblivionAXiS/MyFirstExample/actions/workflows/actions.yml/badge.svg)](https://github.com/OblivionAXiS/MyFirstExample/actions/workflows/actions.yml) + +# My First Example - Adrian Spinali \ No newline at end of file diff --git a/main.cpp b/main.cpp index a495fc9..14215a5 100644 --- a/main.cpp +++ b/main.cpp @@ -9,13 +9,13 @@ int main() 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::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(" << x << ") = " << sqrt(x) << std::endl; + std::cout << "Square Root(" << y << ") = " << sqrt(y) << std::endl; + std::cout << x << " ^ " << y << " = " << pow(x, y) << std::endl; return 0; }