In this program, you'll learn to make a Simple Calculator using a switch/case in Java. This calculator would be able to add, subtract, multiply and divide two numbers.
This program is a simple calculator. It uses a switch/case statement to calculate the calculation and print the result. The program can be enhanced by adding more features like memory, check digit, etc.
This program is written in the Java programming language. The program starts by declaring the main method. The main method is where the execution of a Java program begins.
This program uses the Scanner class to read input from the user. The Scanner class is used to read values and convert them to a primitive data type. The program uses the System.out.println() method to print out the values that are read from the user. Program to find the average of a list of numbers using Scanner class.
To understand this example, you should have knowledge of the following Java programming topics:
- Java Switch Statement
- Java Scanner Class
Post a Comment