Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- double Func(double x, double a, double b, double c)
- {
- if (a < 0 && x != 0)
- return a*x*x + b * b*x;
- else if (a > 0 && x == 0)
- return x - a / (x - c);
- else
- return 1 + x / c;
- }
- void main()
- {
- double a, b, c, x; int i;
- do
- {
- x = -5;
- printf("Write a, b, c: \n");
- scanf("%lf%lf%lf", &a, &b, &c);
- for (x; x < 5; x = x + 0.5)
- {
- printf("Result : %lf\n", Func(x, a, b, c));
- }
- printf("Continue?\n");
- scanf("%d", &i);
- } while (i);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement