Advertisement
Korobka887

КР.Вариант4

Apr 15th, 2023 (edited)
839
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5.     double a, b, c;
  6.     int n;
  7.     scanf("%lf%lf%d", &a, &b, &n);
  8.     c = (b - a) / n;
  9.    
  10.     for (double x = a; x <= b; x += c) {
  11.         printf("%lf | ", x);
  12.         if (x <= 4)
  13.             printf("%lf", pow(x * x + 7, 1.0 / 3.0));
  14.         else if (x <= 9)
  15.             printf("%lf", 5 * (x - 4) * pow(sin(x * x - 16), 2));
  16.         else
  17.             printf("%lf", (x + 1) / (2 * x * x + 5));
  18.        
  19.         printf("\n");
  20.     }
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement