Welcome to our first demo project aimed at testing collaboration skills. In this project, we will build a basic calculator in C and any other programming language of your choice. The goal is to enhance your knowledge of the C programming language while demonstrating effective collaboration for future projects.
The calculator program allows users to perform arithmetic operations by entering two numbers and an arithmetic operator. The program then calculates the result based on the provided operator.
- User-friendly prompt: The program provides clear instructions and prompts to guide users in entering their arithmetic expressions.
- Error handling: The program handles invalid input, such as non-numeric values or invalid operators, by displaying error messages and prompting the user to enter valid input.
- Decimal precision: The program supports calculations with decimal numbers, allowing users to specify the number of decimal places to round the result or enter decimal numbers directly.
Carefully follow the steps listed below to send us your contribution:
-
Fork the repo by clicking the ‘Fork’ button at the top right. A snippet is provided below:
-
Clone your forked repo to your local machine:
git clone <your-forked-repo-url>
You can get the URL of your forked repo in a section of your forked repo that is green in color, like in the snippet above. Click the green ‘Code’ button up there and you shall get ‘your forked repo URL’
- Navigate into the cloned repo on your local machine:
cd <cloned-repo-folder>
- In the base of your cloned-forked repo, run the command below:
git remote add upstream https://github.com/ALX-SE-Algorithmia/Demo-Project.git
-
Make sure that your forked repo’s main branch is up to date with the Organization’s repo main branch. Go to your forked repo’s main branch and click the ‘Sync fork’ button, if it is there on your repo.
-
Create a new branch using the command below:
git checkout -b <your-branch-name>
It is most preferable that your branch name is your name. E.g: git checkout -b dohoudaniel
- You can start creating your C file from here on. But first, create a directory in your name and store your solutions in there.
-
A command to do that is:
mkdir dohoudaniel
-
Navigate to the directory you have created:
cd dohoudaniel
-
- Remember to add a non-empty
README
file to your directory. When you are done, with your solutions, you can add and commit your changes:
git add .
git commit -m “Your commit message”
-
You can now push your changes from your local machine to your branch on GitHub:
git push origin your_branch_name
E.g:
git push origin dohoudaniel
-
Create a pull request from your branch on GitHub.
-
Create your pull request from there on.
-
The assigned code reviewer will review your code, and eventually, you might need to make some changes. Make sure you keep an eye on your email so as to be notified of updates on your pull request.
-
Please add a little explanation in the space provided there on what you have done.
This project is licensed under the MIT License. See the LICENSE file for more details.
Enjoy coding! 👨💻 👩💻 🎧 🤍