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.
To use this calculator program, follow the steps below:
-
Clone the repository:
git clone https://github.com/ALX-SE-Algorithmia/Demo-Project.git
-
Navigate to the project directory:
cd Demo-Project
-
Navigate to any of the contributor's directory:
cd <username>-<lang>
-
Open the calculator program file (
calc.c
or the respective file for your chosen programming language) in your preferred code editor. -
Compile the program using a compatible compiler.
-
Run the compiled executable.
-
Enter two numbers and an arithmetic operator when prompted.
-
View the calculated result.
Here is an example of using the calculator program:
Enter a simple arithmetic expression. Example: 23 * 5
(allowed operators: +, -, *, or /)
=> 12.5 * 4.2
Result: 52.50
We welcome contributions to this project. To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your contribution.
- Make your changes and commit them.
- Push your changes to your forked repository.
- Submit a pull request to the original repository.
This project is licensed under the MIT License. See the LICENSE file for more details.
Enjoy coding! 👨💻 👩💻 🎧 🤍