multiply value in java code example
Example 1: multiplication program java
int i,k;
Scanner sc = new Scanner(System.in);
System.out.println("Enter the Number for the table: ");
int n = sc.nextInt();
for (i=1;i<=10;i++){
k = n * i;
//n + "*" + c + " = " + (n*c))
System.out.println(n + "*"+ i + " = " + k);
}
Example 2: Write a method multiply() in a class Arithmetic
int x = 12;int y = 13;int z = x * y;System.out.println("Multiplication: " + z);