Загрузка данных


#include <math.h>
#include <stdio.h>

double important_function(double x);

int main(void) {
  double x;
  if (scanf("%lf", &x) != 1) {
    printf("n/a\n");
    return 0;
  }
  int next = getchar();
  if (next != '\n' && next != EOF) {
    printf("n/a\n");
    return 0;
  }
  if (x == 0) {
    printf("n/a\n");
    return 0;
  }
  double y = important_function(x);
  if (isnan(y) || isinf(y)) {
    printf("n/a\n");
  } else {
    printf("%.1f\n", y);
  }
  return 0;
}

double important_function(double x) {
  double part1 = 7e-3 * pow(x, 4);
  double part2 = ((22.8 * pow(x, 1.0 / 3) - 1e3) * x + 3) / (x * x / 2);
  double part3 = x * pow(10 + x, 2 / x);
  return part1 + part2 - part3 - 1.01;
}