Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. #include <iostream>
  2. #include<math.h>
  3. #include<stdio.h>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.  
  9. int limite=1,i=1,f,rt,rg;
  10. float axu;
  11.  
  12. printf("\n digite el limite:");
  13. scanf("%d",& limite);
  14. printf("digite el rango:");
  15. scanf("%d",& rg);
  16.  
  17. printf("INGRESE LA FUNCION \n1=SENO\n2=COSENO:");
  18. scanf("%d",& f);
  19.  
  20.  
  21. switch(f){
  22. case 1:
  23. for(i=1;i<=limite;i++)
  24. {
  25. rt=i*rg;
  26. axu=sin(rt);
  27. printf("\n El seno de %d es %.2d",rt,axu);
  28. }
  29. break;
  30.  
  31. case 2:
  32. for(i=1;i<=limite;i++)
  33. {
  34. rt=i*rg;
  35. axu=cos(rt);
  36. printf("\n El coseno de %d es %.2d",rt,axu);
  37. }
  38.  
  39. }
  40.  
  41.  
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement