Advertisement
Guest User

Untitled

a guest
Oct 27th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main()
  4. {
  5. int a,b;
  6. double prodotto;
  7. a = -15.0;
  8. b = -14.0;
  9. for((a=-15) && (b=-14);(a<15) && (b<16);(a++) && (b++))
  10. {
  11. prodotto = sin(a)/a * sin(b)/(b);
  12. if ((a == 0))
  13. {
  14. printf("sin(%d)/(%d) * sin(%d)/(%d) = %lf\n",a,a,b,b,sin(b)/(b));
  15. }
  16. else if(b==0)
  17. {
  18. printf("sin(%d)/(%d) * sin(%d)/(%d) = %lf\n",a,a,b,b,sin(a)/(a));
  19. }
  20. else if ((a != 0) && (b!=0) && (a!=b))
  21. {
  22. printf("sin(%d)/(%d) * sin(%d)/(%d) = %lf\n",a,a,b,b,prodotto);
  23. }
  24.  
  25. }
  26.  
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement