package firstjava;
import java.util.Scanner;
public class FirstJava {
public static void main(String[] args) {
// TODO code application logic here
int a, b;
Scanner s1 = new Scanner(System.in);
System.out.println("Enter value a : ");
a = s1.nextInt();
Scanner s2 = new Scanner(System.in);
System.out.println("Enter value b : ");
b = s2.nextInt();
int c = a * b;
System.out.println("Result is : " + c);
}
}
Output :
run:
Enter value a :
10
Enter value b :
5
Result is : 50
BUILD SUCCESSFUL (total time: 11 seconds)
No comments:
Post a Comment