Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <locale.h>
- #include <math.h>
- int main()
- {
- setlocale(LC_ALL, "Rus");
- double x, y, f;
- printf("Введите x: ");
- scanf("%lf", &x);
- printf("Введите y: ");
- scanf("%lf", &y);
- ((x >= 0) && (x < 5))?printf("получилось %f\n", f=2*x-y):((x < 0) && (y < 0))?printf("получилось %f\n", f= pow(x,2)):printf("получилось %f\n", f = 5*y+1);
- printf("Значение функции: %f", f);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement