Advertisement
erfanul007

Timus 1149

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