Back to project page Smartlab.
The source code is released under:
Apache License
If you think the Android project Smartlab listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ir.smartlab.java.ch06.simplecalculator; /*from w w w . ja v a 2s. c o m*/ import java.util.Scanner; public class SimpleCalculator { public static void main(String[] args) { int first; int second; Scanner input = new Scanner(System.in); System.out.print("Enter first integer: "); first = input.nextInt(); System.out.print("Enter second integer: "); second = input.nextInt(); System.out.println("first + second = " + (first + second)); System.out.println("first - second = " + (first - second)); System.out.println("first * second = " + (first * second)); System.out.println("first / second = " + (first / second)); } }