- A CLI tool that will allow you to compute the Bus last trip empty seats based on the given total number of seats and passengers.
- The technologies are C, GNU C Compiler (GCC), GNU Debugger (GDB), Snapcraft, and GNU/Linux.
# Example 1
Total bus seats = 50
Total passengers = 126
Total last trip empty seats = 24
Explanation: This means at the 3rd trip, there are 24 (50 - 26) remaining seats.
# Example 2
Total bus seats = 50
Total passengers = 10
Total last trip empty seats = 40
Explanation: This means at the 1st trip, there are 40 (50 - 10) remaining seats.
- Install the GNU C Compiler in your machine.
- Go to the root directory. Run the following commands.
# Running the app.
chmod +x run.sh
./run.sh
# Running the app with GDB.
chmod +x run-debug.sh
./run-debug.sh
# If already installed.
sudo snap refresh bus-calculator
# If not yet installed.
sudo snap install bus-calculator
# Run the app.
bus-calculator