Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add steps to guide new users to be able to easily contribute to this project
  • Loading branch information
MartyOfMCA authored Jul 16, 2023
1 parent 89bf0fa commit 3b49646
Showing 1 changed file with 39 additions and 34 deletions.
73 changes: 39 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,57 @@ The calculator program allows users to perform arithmetic operations by entering
- 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.

## Getting Started
To use this calculator program, follow the steps below:
## Contributing
Carefully follow the steps listed below to send us your contribution:

1. Clone the repository:
```
git clone https://github.com/ALX-SE-Algorithmia/Demo-Project.git
```
1. [Visit the Demo Project Repo](https://github.com/ALX-SE-Algorithmia/Demo-Project/)
2. Fork the repo by clicking the ‘Fork’ button at the top right. A snippet is provided below:

2. Navigate to the project directory:
```
cd Demo-Project
```
![image](https://github.com/ALX-SE-Algorithmia/Demo-Project/assets/104218489/a3787b66-bf7c-428d-81b5-920ad53cea93)

3. Navigate to any of the contributor's directory:
```
cd <username>-<lang>
```
3. Clone your forked repo to your local machine:

4. Open the calculator program file (`calc.c` or the respective file for your chosen programming language) in your preferred code editor.
`git clone <your-forked-repo-url>`

5. Compile the program using a compatible compiler.
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’

6. Run the compiled executable.
4. Navigate into the cloned repo on your local machine:

`cd <cloned-repo-folder>`

7. Enter two numbers and an arithmetic operator when prompted.
5. In the base of your cloned-forked repo, run the command below:

8. View the calculated result.
`git remote add upstream https://github.com/ALX-SE-Algorithmia/Demo-Project.git`

## Example
Here is an example of using the calculator program:
6. 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.

```
Enter a simple arithmetic expression. Example: 23 * 5
(allowed operators: +, -, *, or /)
=> 12.5 * 4.2
Result: 52.50
```
![image](https://github.com/ALX-SE-Algorithmia/Demo-Project/assets/104218489/5937fb0c-c994-4e63-88eb-1f2cf28cfe82)

7. Create a new branch using the command below:

`git checkout -b <your-branch-name>`

## Contributing
We welcome contributions to this project. To contribute, please follow these steps:
It is most preferable that your branch name is your name. E.g: `git checkout -b dohoudaniel`

8. 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`
9. 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”`

10. 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`

1. Fork the repository.
2. Create a new branch for your contribution.
3. Make your changes and commit them.
4. Push your changes to your forked repository.
5. Submit a pull request to the original repository.
11. Create a pull request from your branch on GitHub.
12. Create your pull request from there on.
13. 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.
14. Please add a little explanation in the space provided there on what you have done.

## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
Expand Down

0 comments on commit 3b49646

Please sign in to comment.