Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

Java Simple programme to do Multiplication

Java Simple programme to do Multiplication

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
Inline Feedbacks
View all comments