1.

Write ajava program to input two real numbersand find the difference between the the two numbers.​

Answer»

ANSWER:

CLASS NUMBER

{

public static VOID main()

{

int a,b;

Scanner sc= new Scanner(System.in);

System.out.println ("enter 2 nos.");

a= sc.nextInt ();

b=sc.nextInt();

int d=a-b;

System.out.println(d+" is the difference between the 2 nos.");

}

}

Explanation:

input the 2 nos. and then find the difference btw them.



Discussion

No Comment Found