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 207 views
1 answer 179 views
2 answers 311 views
1 answer 205 views
1 answer 240 views
1 answer 182 views
...