Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple Java program that acts as a command-line calculator, performing basic arithmetic operations on two numbers input by the user.

Sudhanshu-Ambastha/Java-Basic-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

Basic Calculator

This is a simple command-line Java program that acts as a basic calculator. It takes two numbers and an operation as input from the user and performs the corresponding calculation.

How to Use

  1. Input Format:

    • The program expects three inputs from the user:
      1. First Number
      2. Second Number
      3. Operation (+, -, *, /)
  2. Running the Program:

  3. Example:

    • User Input:
      10
      5
      +
      
    • Expected Output:
      Result: 15.0
      
  4. Error Handling:

    • The program handles division by zero error.

About

A simple Java program that acts as a command-line calculator, performing basic arithmetic operations on two numbers input by the user.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /