Skip to content

danujaadikari/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator 🧮

A modern, feature-rich calculator mobile application built with React Native and Expo. This calculator offers a sleek dark interface with smooth animations and intuitive user experience.

✨ Features

  • Basic Arithmetic Operations: Addition, subtraction, multiplication, and division
  • Advanced Functions:
    • Percentage calculations
    • Toggle sign (+/-)
    • Decimal point support
  • Smart Expression Display: Shows both the current input and the ongoing calculation
  • Number Formatting: Automatic comma separation for thousands
  • Error Handling: Division by zero protection
  • Responsive Design: Optimized for various screen sizes
  • Modern UI: Dark theme with smooth animations and visual feedback

📱 Screenshots

The calculator features:

  • Clean, dark-themed interface
  • Large, easy-to-read display
  • Color-coded buttons (operators in orange, functions in gray, numbers in dark gray)
  • Expression history display above main result
  • Smooth touch feedback

🚀 Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Expo CLI
  • Expo Go app (for testing on physical devices)

Installation

  1. Clone the repository:
git clone https://github.com/danujaadikari/Calculator.git
cd Calculator
  1. Install dependencies:
npm install
# or
yarn install
  1. Start the development server:
npm start
# or
expo start
  1. Run on your device:
    • Scan the QR code with Expo Go (Android) or Camera app (iOS)
    • Or press a for Android emulator
    • Or press i for iOS simulator
    • Or press w to run in web browser

📋 Available Scripts

  • npm start - Start the Expo development server
  • npm run android - Run on Android device/emulator
  • npm run ios - Run on iOS simulator (macOS only)
  • npm run web - Run in web browser

🛠️ Built With

  • React Native (0.74.5) - Mobile application framework
  • React (18.2.0) - JavaScript library for building user interfaces
  • Expo (~51.0.0) - Platform for making universal React applications
  • Expo Status Bar (~1.12.1) - Status bar component

📂 Project Structure

Calculator/
├── App.js              # Main application component with calculator logic
├── app.json            # Expo configuration
├── package.json        # Project dependencies and scripts
├── babel.config.js     # Babel configuration
├── README.md           # Project documentation
└── LICENSE             # License file

🎯 How to Use

  1. Number Input: Tap number buttons (0-9) to input values
  2. Operators: Use +, −, ×, ÷ for calculations
  3. Equals: Press = to see the result
  4. Clear: Press C to reset the calculator
  5. Toggle Sign: Press ± to switch between positive and negative
  6. Percentage: Press % to convert the current value to percentage
  7. Decimal: Press . to add decimal point

💡 Key Features Explained

Expression Display

The calculator shows your ongoing calculation at the top and the current input/result below, making it easy to track your calculations.

Number Formatting

Large numbers are automatically formatted with commas (e.g., 1,000,000) for better readability.

Chained Calculations

You can perform multiple operations in sequence without pressing equals after each operation.

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Developer Information

Danuja Adikari
📧 Email : danujaadikari2001@gmail.com
💼 LinkedIn : linkedin.com/in/danuja-adikari


About

Calculator Mobile App built with React Native

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors