/Demo-Project

Our first demo project we will be working on together, to test collaboration skills.

Primary LanguageCMIT LicenseMIT

Demo Project - Calculator

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.

Project Description

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.

Features

  • 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.

Getting Started

To use this calculator program, follow the steps below:

  1. Clone the repository:

    git clone https://github.com/ALX-SE-Algorithmia/Demo-Project.git
    
  2. Navigate to the project directory:

    cd Demo-Project
    
  3. Navigate to any of the contributor's directory:

    cd <username>-<lang>
    
  4. Open the calculator program file (calc.c or the respective file for your chosen programming language) in your preferred code editor.

  5. Compile the program using a compatible compiler.

  6. Run the compiled executable.

  7. Enter two numbers and an arithmetic operator when prompted.

  8. View the calculated result.

Example

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

Contributing

We welcome contributions to this project. To contribute, please follow these steps:

  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.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


Enjoy coding! 👨‍💻 👩‍💻 🎧 🤍