Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

multiplication of two numbers in java using scanner



import java.util.Scanner;

public class Multiplynumbers {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		System.out.println("enter the first number");
		int a= scan.nextInt();
		System.out.println("enter the second number");
		int b= scan.nextInt();
		int c=a*b;
		System.out.println(c);
	}

}
 
PREVIOUS NEXT
Tagged: #multiplication #numbers #java #scanner
ADD COMMENT
Topic
Name
7+7 =