Advertisement
igorsan98

LB8v20_3

Oct 26th, 2015
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <locale.h>
  4. main(){
  5. int x;
  6. double y ;
  7. double Pi = 3.14159265358979323846;
  8. for(x=1 ; x <26;x++)
  9.     {
  10.      switch (x)
  11.            
  12.             {
  13.             case 12: case 15: case 18:
  14.             y = sqrt(1 + pow(cos(2*x),2));
  15.             break;
  16.             case 10: case 11: case 13:
  17.             case 14:case 16:case 17:case
  18.             19:case 20:
  19.             y = log(pow(x,3)+1.8);
  20.             break;
  21.             case 2:case 3:case 4:case 5:
  22.             case 21:case 22:case 23:case 24:
  23.             y = log(pow(x,3)+1.8);
  24.             break;
  25.             default : y = pow(x,2) + x*5 ;
  26.             break;
  27.             }
  28.         printf(" x =%i\t y=%f\n",x,y);
  29.     }
  30.  
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement