fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. // Объявление переменных
  5. double x, y, z, S1, numerator, denominator;
  6.  
  7. // Ввод значений для x, y, z
  8. printf("Введите значения для x, y, z: ");
  9. scanf("%lf %lf %lf", &x, &y, &z);
  10.  
  11. // Проверка, чтобы избежать деления на ноль
  12. if (x == 0 || y == 0 || (2 * z - y) == 0) {
  13. printf("Ошибка: деление на ноль!\n");
  14. return 1;
  15. }
  16.  
  17. // Вычисление числителя и знаменателя
  18. numerator = (32 * x - 68 * x * y * z + (12 * y / x));
  19. denominator = (2.5 * y * (2 * z - y));
  20.  
  21. // Вычисление S1
  22. S1 = (x * y * z) - (numerator / denominator);
  23.  
  24. // Вывод результата
  25. printf("Значение S1: %.2lf\n", S1);
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
Введите значения для x, y, z: Значение S1: -inf