1 min read

Java Simple programme to do Multiplication

java

Java Simple programme using to do some Multiplication. In this example we are going to use java.util.Scanner to take inputs and then multiply them to get result.

/*
* Java Programe to do
* simple Multiplication
*/
import java.util.Scanner;

class Multi{

public static void main(String []args){
float x,y,product;
Scanner in=new Scanner(System.in);
System.out.println(“Enter No. one”);
x=in.nextFloat();
System.out.println(“Enter No. two”);
y=in.nextFloat();

product=x*y;
System.out.println(“Product = ” +product);

}

}

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted