How to get max from two long double numbers in C

1 Answer

0 votes
#include <stdio.h>
#include <math.h>

int main(void) {
	long double x = 90987.9821;
	long double y = 98371.2704;
	
	long double max = fmaxl(x, y);
	
	printf("%Lf\n", max);
	
	return 0;
}




/*
run:

98371.270400

*/

 



answered Jul 31, 2022 by avibootz

Related questions

1 answer 302 views
1 answer 265 views
2 answers 405 views
1 answer 288 views
1 answer 340 views
1 answer 273 views
...