This repository was created as part of my learning journey in using Git and GitHub, following a workshop on YouTube entitled "Come and Git It." It includes a simple calculator program written in the C programming language.
The main purpose of this repository is to practice:
- 🌀 Initializing a Git repository
- ✍️ Writing and committing code
- 📤 Pushing a project to GitHub
- 🧩 Understanding the basics of version control
This calculator program is extremely basic and was created as part of the workshop. It performs simple operations such as:
- ➕ Addition
- ➖ Subtraction
- ✖️ Multiplication
- ➗ Division
Note: This program is not intended to be a fully-featured calculator but rather serves as an exercise to demonstrate GitHub workflows.
- Clone the repository to your local machine. Open your terminal (on Linux/Mac) or command prompt (on Windows) and run:
git clone <repository-url>
- Navigate to the directory containing the program:
cd <repository-folder-name>
- Compile the program using the GCC compiler (ensure GCC is installed):
gcc calculator.c -o calculator
- Run the program:
./calculator
Note: If you're on Windows, use tools like Git Bash or WSL (Windows Subsystem for Linux). Alternatively, any terminal with a GCC-compatible environment will work.
- Open Visual Studio and create a new project.
- Select Empty Project and name it (e.g.,
SimpleCalculator
). - Copy and paste the
calculator.c
file into the Source Files folder in the Solution Explorer. - Right-click the project name in Solution Explorer and choose Set as Startup Project.
- Build and run the project by pressing
Ctrl + F5
.
- Open your preferred IDE and create a new project.
- Import or add the
calculator.c
file to the project. - Build the project using the IDE's Build or Compile option.
- Run the project from the IDE.
A big thanks to Ms. Darla David, the creator of the YouTube workshop, for providing a beginner-friendly guide to Git and GitHub. You may visit the workshop to follow along and learn how to commit and push projects to GitHub yourself! 🌟