fork download
  1. /* My C program */
  2. #include <stdio.h>
  3. #include <math.h>
  4. int main(void)
  5. {
  6. float x = 0.0, y = 0.0, z = 0.0, a = 0.0;
  7. printf("Please enter value for x\n");
  8. scanf("%f", &x);
  9. printf("%f\n", x);
  10. printf("Please enter value for y\n");
  11. scanf("%f", &y);
  12. printf("%f\n", y);
  13. printf("Please enter value for z\n");
  14. scanf("%f", &z);
  15. printf("%f\n", z);
  16. a = log10(sqrt(exp(x - y)) + exp(fabs(y) * log(x)) + z);
  17. printf("Final result is a = %f\n", a);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0.01s 5276KB
stdin
1.542
-3.261
80.005
stdout
Please enter value for x
1.542000
Please enter value for y
-3.261000
Please enter value for z
80.004997
Final result is a = 1.978409