This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<bits/stdc++.h> // header file for all c++ libraries | |
| using namespace std; // stdout library for printing values | |
| bool custom_sort(double a, double b) /* this custom sort function is defined to | |
| sort on basis of min absolute value or error*/ | |
| { | |
| double a1=abs(a-0); | |
| double b1=abs(b-0); | |
| return a1<b1; | |
| } | |
| int main() |