This is a simple calculator application built using React Native. It supports basic arithmetic operations, square root, percentage, and more.
- Basic arithmetic operations: addition, subtraction, multiplication, and division.
- Square root calculation.
- Percentage calculation.
- Toggle between positive and negative numbers.
- Clear all input.
- Backspace functionality.
- Supports decimal numbers.
- Displays formatted numbers with thousand separators.
-
Clone the repository:
git clone https://github.com/ChathurK/Calculator-App.git cd Calculator-App -
Install dependencies:
npm install
-
Start the application:
npm start
- Tap the buttons to input numbers and operators.
- Use the
ACbutton to clear all input. - Use the
+/-button to toggle the sign of the current number. - Use the
√button to calculate the square root of the current number. - Use the
%button to calculate the percentage. - Use the
=button to evaluate the expression. - Use the backspace button to remove the last character.
/calculator
├── components
│ ├── button.js # Custom button component for the calculator
│ ├── icons.js # Icon definitions used in the calculator buttons
│ └── row.js # Component to arrange buttons in a row
│
├── styles
│ └── colors.js # Color definitions and styles for the app
│
├── util
│ └── calculator.js # Utility functions and logic for calculator operations
│
└── App.js # Main application component
react: JavaScript library for building user interfaces.react-native: Framework for building native apps using React.expo: Framework and platform for universal React applications.mathjs: Library for mathematical operations.react-native-vector-icons: Library for customizable icons.