adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Program in Java to multiply two numbers

Program in Java to multiply two numbers
class MultiplyDemo
{
 public static void main(String []args)
 {
        java.util.Scanner cin = new java.util.Scanner(System.in);
	System.out.print("Enter two integer numbers :- ");
	int x = cin.nextInt();
	int y = cin.nextInt();
	System.out.println("Multiplication of two integer values = "+(x * y));
	System.out.print("\nEnter two floating point numbers :- ");
	float a = cin.nextFloat();
	float b = cin.nextFloat();
	System.out.println("Multiplication of two floating point values = "+(a * b));
 }
}

Output :-


   








Post a Comment

0 Comments