Search
 
SCRIPT & CODE EXAMPLE
 

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);
	}

}
Comment

PREVIOUS NEXT
Code Example
Java :: java send request 
Java :: java array to collection 
Java :: Problem adding rectangle in javaFX 
Java :: How to create a popup window (PopupWindow) in Android 
Java :: how to add input in array java 
Java :: Get the last Friday of a month in Java 
Java :: Do not concatenate text displayed with setText. Use resource string with placeholders. 
Java :: java stream limit items 
Java :: Validation failed for query for method public abstract java.util.List 
Java :: Java for Keyword 
Java :: get driver mysql 
Java :: java triangle 
Java :: caused by: java.lang.noclassdeffounderror: org/springframework/boot/configurationprocessor/json/jsonexception 
Java :: overloading + operator in java 
Java :: iterable interface in java 
Java :: check if string is uuid 
Java :: How to print in console java 
Java :: how to set radio button checked in android programmatically 
Java :: java create new arraylist with elements 
Java :: set java path on linux ubuntu 
Java :: java quit application 
Java :: sum of list java 
Java :: spring scheduled 
Java :: jtable get get row 
Java :: formula to calculate area of a triangle java 
Java :: java get first day of the week 
Java :: java stream get all max values 
Java :: java mockito any string import 
Java :: how to print byte array in java 
Java :: skip values in a for loop java 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =