Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main() {
- double a, b, c;
- int n;
- scanf("%lf%lf%d", &a, &b, &n);
- c = (b - a) / n;
- for (double x = a; x <= b; x += c) {
- printf("%lf | ", x);
- if (x <= 4)
- printf("%lf", pow(x * x + 7, 1.0 / 3.0));
- else if (x <= 9)
- printf("%lf", 5 * (x - 4) * pow(sin(x * x - 16), 2));
- else
- printf("%lf", (x + 1) / (2 * x * x + 5));
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement