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);

}

}

 

Leave a Reply

avatar

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

  Subscribe  
Notify of
Do you have any Query / Suggestion