elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


  Mostrar Temas
Páginas: [1]
1  Programación / Programación C/C++ / como puedo arreglar el error F:\collect2.exe[Error] ld returned 1 exit status en: 15 Agosto 2018, 02:34 am
hola, mi problema es que apenas estoy empezando a esto de la programación,pero mi profe ya me pidió meter arreglos a mi proyecto, solo que no puedo ni arreglar el error que me aparece, intento e intento pero no puedo arreglarlo, el error es F:\collect2.exe   [Error] ld returned 1 exit status

alguien me puede ayudar por favor?


Código
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. int main ()
  5. {
  6. int opc,opc1,opc2,cantidad;
  7. double acumsub=0, acumtotal=0,total,subtotal;
  8.  
  9. printf("desea acceder al menu? \n ");
  10. printf("1.si \n");
  11. printf("2.no \n");
  12. scanf("%d",&opc);
  13.  
  14. while(opc!=2)
  15. {
  16. printf("               OTAKO MARKET               \n ");
  17. printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n ");
  18. pirntf("          ~~~~~~~~~~~~~~~~~~~~~~~         \n ");
  19. printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n ");
  20. printf("^          1. Pokies      70.00         ^ \n ");
  21. printf("^          2. Ramen       60.00         ^ \n ");
  22. printf("^          3. Ramune      60.00         ^ \n ");
  23. printf("^          4. Dangos      40.00         ^ \n ");
  24. printf("^          5. Anpan       30.00         ^ \n ");
  25. printf("^          6. Wagashi     30.00         ^ \n ");
  26. printf("^          7. Onigiri     20.00         ^ \n ");
  27. printf("* INGRESE EL NUMERO DE PRODUCTO QUE DESEA* \n");
  28. scanf("%d",&opc1);
  29.  
  30. printf("cantidad para llevar \n ");
  31. scanf ("%d",&cantidad);
  32.  
  33. if (opc1=1)
  34. {
  35. subtotal=cantidad*70.00;
  36. total=subtotal;
  37.  
  38. printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
  39. printf("TOTAL A PAGAR: %2.lf \n ",total);
  40.  
  41.  
  42. }
  43.  
  44. else if (opc1==2)
  45. {
  46. subtotal=cantidad*60.00;
  47. total=subtotal;
  48.  
  49. printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
  50. printf("TOTAL A PAGAR: %2.lf \n ",total);
  51. }
  52.  
  53. else if (opc1==3)
  54. {
  55. subtotal=cantidad*60.00;
  56. total=subtotal;
  57.  
  58. printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
  59. printf("TOTAL A PAGAR: %2.lf \n ",total);
  60. }
  61.  
  62. else if (opc1==4)
  63. {
  64. subtotal=cantidad*40.00;
  65. total=subtotal;
  66.  
  67. printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
  68. printf("TOTAL A PAGAR: %2.lf \n ",total);
  69. }
  70.  
  71. else if (opc1==5)
  72. {
  73. subtotal=cantidad*30.00;
  74. total=subtotal;
  75.  
  76. printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
  77. printf("TOTAL A PAGAR: %2.lf \n ",total);
  78. }
  79.  
  80. else if (opc1==6)
  81. {
  82. subtotal=cantidad*30.00;
  83. total=subtotal;
  84.  
  85. printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
  86. printf("TOTAL A PAGAR: %2.lf \n ",total);
  87. }
  88.  
  89. else if (opc1==7)
  90. {
  91. subtotal=cantidad*20.00;
  92. total=subtotal;
  93.  
  94. printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
  95. printf("TOTAL A PAGAR: %2.lf \n ",total);
  96. }
  97.  
  98. else
  99. {
  100. printf("ERROR,la opcion no es valida \n ");
  101.  
  102.  
  103. }
  104.  
  105. acumsub+=subtotal;
  106. acumtotal+=total;
  107.  
  108. printf ("Desea realizar otra compra? \n ");
  109. printf ("1.si \n");
  110. printf ("2.no \n");
  111. scanf ("%d",&opc);
  112.  
  113. }
  114.  
  115. printf ("EL SUBTOTAL ES DE: %2.lf,acumsubtotal");
  116. printf ("EL TOTAL A PAGAR ES DE: %2.lf",acumtotal);
  117.  
  118. getch ();
  119. return 0;
  120. }


Mod: Obligatorio el uso dee etiquetas GeSHi.
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines