lesson 2 math operations Using Java Netbeans IDE 8.2 Featuring the Scanner input Reader
package firstprograms; import java.util.Scanner ; import java.io.*; public class MathBasic { public static void main(String args[]) { Scanner in=new Scanner (System.in).useDelimiter("\n"); //Class needed to use scanner input reader //list of variables to store 2 input numbers float n1,n2 ; // list of variables to store computer values double sum, diff,quotient,product; //input first numbers ; System.out.print("Ënter first number : "); //read and store input number n1=in.nextInt(); //input second numbers ; System.out.print("Ënter second number :"); //read and store input ...
Comments
Post a Comment