Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- int a,b;
- double prodotto;
- a = -15.0;
- b = -14.0;
- for((a=-15) && (b=-14);(a<15) && (b<16);(a++) && (b++))
- {
- prodotto = sin(a)/a * sin(b)/(b);
- if ((a == 0))
- {
- printf("sin(%d)/(%d) * sin(%d)/(%d) = %lf\n",a,a,b,b,sin(b)/(b));
- }
- else if(b==0)
- {
- printf("sin(%d)/(%d) * sin(%d)/(%d) = %lf\n",a,a,b,b,sin(a)/(a));
- }
- else if ((a != 0) && (b!=0) && (a!=b))
- {
- printf("sin(%d)/(%d) * sin(%d)/(%d) = %lf\n",a,a,b,b,prodotto);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement