NABILA MILLIE COPYRIGHT®


Thursday, March 24, 2011

arithmetic expression in scanner


SCANNER :P


import java.util.Scanner;
public class Nabila{
public static void main(String args[]){
Scanner a = new Scanner (System.In);
System.out.print("Enter First Name");
int a = a.nextInt( );
System.out.println("You Entered First Number" + a);
System.out.print("Enter Second Number");
int b = a.nextInt( );
System.out.println("You Entered Second Number" + b);
int c =a+b(yg nie je kna tkar ikot la arithmmetic expressions)
System.out.println("The Result Is" + c);
}
}


No comments:

Post a Comment