Friday, September 11, 2020

Addition Mini Calculator Using Java | Source Code | Full Details | More Information

Simple Calculator Using Java

In this Java Program, I have managed to build a Mini Adding Calculator Using Java, So If you want then Copy the Codes from Below.

If You are a Advanced Java Programmer, Then It is Not For You. This Program Is Only For Beginners Or InterMediate Java Programmers Because It is Not GUI(Graphical User Interface) Program.

Things to Do Before Copying Codes

1. Make Sure You have Installed Java and Its JDK

2. Create A New Folder WhereEver You Want

3. Create a New File in The Folder Name "Anything.bat"

4. Right Click On the File and Click Edit And Paste the Given Text There.

java -jar JavaCalculator.jar


    import java.util.Scanner;
              
public class Main {
              
                  public static void main(String[] args) throws InterruptedException {
                      for (int i = 0; i < 2000; i++) {
                          Scanner scanner = new Scanner(System.in);
                          double a, b;
                          System.out.print("Enter The First Number to add : ");
                          a = scanner.nextDouble();
                          System.out.print("Enter the Second Number to add: ");
                          b = scanner.nextDouble();
                          System.out.println();
                          System.out.println();
                          System.out.println(a+b);
                          }
                         }
                        }
    

Make Sure To Build This in .jar Format and Save the File Name As "JavaCalculator.jar"

You can Use This As Much As You Want Coz This is In A Loop

Macstock

Author & Editor

Python Programmer and a Simple Web Developer. Owns a Youtube Channel Named MacStock Tech & Gaming and This Website also Refers to him

0 Comments:

Post a Comment