From e9c31322d7478b11bc17afb40a86a35bcdf5b82d Mon Sep 17 00:00:00 2001 From: Priyanshu Sharma Date: Thu, 21 Oct 2021 14:13:05 +0530 Subject: [PATCH] It shows the minimum absolute difference between the elements of an array --- minimum_absolute_diff.java | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 minimum_absolute_diff.java diff --git a/minimum_absolute_diff.java b/minimum_absolute_diff.java new file mode 100644 index 0000000..d99b8ce --- /dev/null +++ b/minimum_absolute_diff.java @@ -0,0 +1,34 @@ + +import java.util.*; +public class minimum_absolute_diff { + + public static void main(String[] args) { + Scanner sc=new Scanner(System.in); + int n,i,j; + System.out.println("Enter the size of the array"); + n=sc.nextInt(); + int a[]=new int [n]; + for(i=0;i