Git Product home page Git Product logo

advanced_calculator_java's Introduction

Advanced Java Calculator

This repository contains the source code for an advanced Java calculator. The calculator is a console application that allows users to perform various arithmetic and advanced mathematical operations such as addition, subtraction, multiplication, division, exponentiation, trigonometric functions, logarithmic functions, and factorials.

Features

  • Perform basic arithmetic operations: addition, subtraction, multiplication, and division
  • Calculate exponentiation (raising a number to a power)
  • Calculate trigonometric functions: sine, cosine, and tangent
  • Calculate logarithmic functions: base 10 and natural logarithm (base e)
  • Calculate factorials of non-negative integers
  • Interactive menu-driven interface
  • Easily extendable to support more operations

Prerequisites

  • Java Development Kit (JDK) 8 or higher

How to Compile and Run

  • Clone the repository or download the source code:
git clone https://github.com/yourusername/advanced-java-calculator.git
  • Navigate to the project directory:
cd advanced-java-calculator
  • Run the compiled Java class:
java AdvancedCalculator

Usage

  • When the calculator starts, you will see a menu with available operations:
Advanced Calculator
1. Add
2. Subtract
3. Multiply
4. Divide
5. Exponentiation
6. Sine
7. Cosine
8. Tangent
9. Logarithm (base 10)
10. Natural Logarithm (base e)
11. Factorial
12. Exit
Enter your choice (1-12):

  • Enter the number corresponding to the desired operation.

  • Provide the required operands (two numbers) when prompted.

  • The result of the operation will be displayed.

  • The calculator will return to the main menu, where you can choose another operation or exit the application by selecting option 6.

Contributing

Contributions to this project are welcome! If you'd like to improve the code, add new features, or fix bugs, please follow these steps:

  • Fork the repository on GitHub.
  • Create a new branch for your changes.
  • Make changes or additions to the code in your branch.
  • Test your changes to ensure the application still works correctly.
  • Create a pull request with a clear description of your changes.

I will review your pull request and provide feedback or merge your changes into the main repository.

License

This project is licensed under the MIT License. You are free to use, modify, and distribute the code as long as you follow the terms of the license.

advanced_calculator_java's People

Contributors

armin-af avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.