Multiplication one constant and loop - Raghavendra25/Java-Basics GitHub Wiki

package myfirstapp; // Define your package name here

/* Java Program for multiplying two numbers; *author Raghavendra */

public class MyJavaApp { public static void main(String[] array_hiremath){

	int i, j; // Declared two variables
	
	// Loop i for 10 times.
	for(i=1 ; i<=10; i++){
		j = 2; // Declare constant value
		int k = j * i; // Result will be saved under K variable
		System.out.println(j+ " * " +i+ " = " +k); // Outputs multiplication value 
	}
	
}	

}