fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. double x, y, z, S1;
  5.  
  6. // Input values for x, y, z
  7. printf("Enter the values for x, y, z: ");
  8. scanf("%lf %lf %lf", &x, &y, &z);
  9.  
  10. // Check to avoid division by zero in the equation
  11. if (x == 0 || y == 0 || (2 * z - y) == 0) {
  12. printf("Invalid input: division by zero!\n");
  13. return 1;
  14. }
  15.  
  16. // Compute the equation
  17. S1 = (x * y * z) - ((32 * x - 68 * x * y * z + (12 * y / x)) / (2.5 * y * (2 * z - y)));
  18.  
  19. // Output the result
  20. printf("The value of S1 is: %lf\n", S1);
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
Enter the values for x, y, z: The value of S1 is: -inf