Advertisement
MochaGovno

If

May 23rd, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. IF
  2. #include <math.h>
  3. #include <stdio.h>
  4. main()
  5. {
  6.     int x; float a=5,b=1.2,y=6;
  7.     double z=0;
  8.     printf("Vvedite X:");
  9.     scanf("%d",&x);
  10.     if (x==3)
  11.         z=y*y+0.3*a;
  12.     else if (x==5 || x==2)
  13.             z=a+exp(y*b);
  14.          else if (x==6 || x==7 || x==8)
  15.                 z=y*y+y-b;
  16.     printf("%6.2lf",z);
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement