In this Program the user is asked to enter two numbers. Based on the numbers the division of two numbers is per


Step 1: Start.

Step 2: Declare variables, say a, b and c.

Step 3: c = a/b;

Step 4: Display result.

Step 5: Stop.

Source code:

import java.util.Scanner;
class Division
	public static void main(String args[])
		int num1;
		int num2;
		float result;
		System.out.println("\n \n *** *** \n \n");
    		System.out.println("<< JAVA Program for division Two Integers >> \n \n");
		Scanner scanner = new Scanner(; 
		System.out.println("Enter first number:");
		num1 = scanner.nextInt();
		System.out.println("Enter Second number:");
		num2 = scanner.nextInt();
		result = num1 / num2;
		System.out.println("The division of two numbers is:" +result); 		



C:\Users\santo\Desktop\new>java Division

*** ***

<< JAVA Program for division Two Integers >>

Enter first number:


Enter Second number:


The division of two numbers is:2.0

Screenshot of Output:

Screenshot of output


Leave a Reply

Your email address will not be published.