Advertisement
cd62131

square of difference of sqrt

Jan 28th, 2014
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. double reverse(const double a, const double b) {
  5.   double ret = sqrt(a) - sqrt(b);
  6.   return ret * ret;
  7. }
  8. int main(void) {
  9.   printf("%lf\n", reverse(1., 2.));
  10.   printf("%lf\n", reverse(2., 3.));
  11.   printf("%lf\n", reverse(3., 4.));
  12.   return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement