Skip to content
Open
Show file tree
Hide file tree
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
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
23 changes: 23 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 8 additions & 7 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ 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;
std::cout << "with remainder of " << x % y << std::endl;
std::cout << "Square root of " << x << " is " << sqrt(x) << std::endl;
std::cout << "Square root of " << y << " is " << sqrt(y) << std::endl;
std::cout << x << "^" << y << "=" << pow(x, y) << std::endl;

return 0;
}