Skip to content

Latest commit

 

History

History
33 lines (17 loc) · 323 Bytes

subtraction.md

File metadata and controls

33 lines (17 loc) · 323 Bytes

class Sub

{

public static void main(String[] arg)

{

int a,b,c;

Scanner s=new Scanner(System.in);

System.out.println("Enter first number");

a=s.nextInt();

System.out.println("Enter second number");

b=s.nextInt();

if(a>b)

c=a-b;

else

c=b-a;

System.out.println("Subtraction of two numbers is : "+c);

}

}