Advertisement
Mary_99

ex1.6a

Nov 22nd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main()
  4. {
  5.   float x;
  6.   float y;
  7.   printf( "Enter the x = \n");
  8.   scanf("%lf", &x);
  9.   if (x >= -5 && x <=5)
  10.   {
  11.       y = 2*x*x+3*x-1;
  12.   }
  13.   else
  14.   {
  15.      y=pow (x+5,2)-10;
  16.   }
  17.     printf("%f",y);
  18.    return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement