Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. # include <math.h>
  4.  
  5. int f(int x,int a, int b){
  6. float m,n,p,q;
  7. float F;
  8.  
  9.  
  10.  
  11. m=exp(-b*x)+(x+sqrt(x+a));
  12. n=x-sqrt(abs(x-b));
  13. p=(pow(a,2)*x)+exp(-x)*cos(b*x);
  14. q=(b*x)-exp(-x)*sin(b*x)+1;
  15. F=(m/n)+(p/q);
  16.  
  17. printf("rez=%.2f\n",F);
  18. }
  19.  
  20. int main(){
  21. int x,a,b;
  22. printf("Introduceti variabila x= ");
  23. scanf("%d",&x);
  24. printf("-----------------------\n");
  25. printf("Introduceti variabila a ");
  26. scanf("%f",&a);
  27. printf("Introduceti variabila b ");
  28. scanf("%f",&b);
  29.  
  30. if(f(x,a,b)==f(-x,a,b)){
  31. printf("funtia este para");
  32. }
  33. else{
  34. printf("Functia este impara");
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement