From 2d500c88b7c926f549fa14ff2dcc547beacf4518 Mon Sep 17 00:00:00 2001 From: Abhijit Chakraborty <91558173+Abhijitchakraborty13@users.noreply.github.com> Date: Sun, 17 Oct 2021 10:57:03 +0530 Subject: [PATCH] created subtraction.md using java my first pr abhijit chakraborty --- subtraction.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 subtraction.md diff --git a/subtraction.md b/subtraction.md new file mode 100644 index 0000000..f093438 --- /dev/null +++ b/subtraction.md @@ -0,0 +1,33 @@ +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); + +} + +}