Answer E21

x squared plus y squared over a minus b
#include <stdio.h>

/* Puzzle E21-- math to C, Again */
 
int main()
{
  double x = 12.3, y = 7.2, c = 3.2;
  double result;
  
  result =  (x*x + y*y)/(a - b);  /* Both sets of () are needed */
  
  printf("result: %f\n", result ); 
  return 0;
}

x2 means x times x.

The low-precidence + combines the two squares.



Back to Puzzle Home