Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main(void) {
- float a = 1.8;
- float x = -2;
- float delta = 0.5;
- float Y;
- for (;x =< 2; x = x + delta){
- if(x >= 1) {
- Y = log(x);
- } else if (-1 < x && x < 1) {
- Y = sqrt(pow(x, 2) + pow(a, 3))/a;
- } else if (x <= 1) {
- Y = exp(x);
- }
- printf("y=%f", Y);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement