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 308 views
1 answer 270 views
2 answers 410 views
1 answer 290 views
1 answer 342 views
1 answer 278 views
...