Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - Alejandro2002

#1
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 (cpp) [Seleccionar]
#include <stdio.h>
#include <conio.h>

int main ()
{
int opc,opc1,opc2,cantidad;
double acumsub=0, acumtotal=0,total,subtotal;

printf("desea acceder al menu? \n ");
printf("1.si \n");
printf("2.no \n");
scanf("%d",&opc);

while(opc!=2)
{
printf("               OTAKO MARKET               \n ");
printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n ");
pirntf("          ~~~~~~~~~~~~~~~~~~~~~~~         \n ");
printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n ");
printf("^          1. Pokies      70.00         ^ \n ");
printf("^          2. Ramen       60.00         ^ \n ");
printf("^          3. Ramune      60.00         ^ \n ");
printf("^          4. Dangos      40.00         ^ \n ");
printf("^          5. Anpan       30.00         ^ \n ");
printf("^          6. Wagashi     30.00         ^ \n ");
printf("^          7. Onigiri     20.00         ^ \n ");
printf("* INGRESE EL NUMERO DE PRODUCTO QUE DESEA* \n");
scanf("%d",&opc1);

printf("cantidad para llevar \n ");
scanf ("%d",&cantidad);

if (opc1=1)
{
subtotal=cantidad*70.00;
total=subtotal;

printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
printf("TOTAL A PAGAR: %2.lf \n ",total);


}

else if (opc1==2)
{
subtotal=cantidad*60.00;
total=subtotal;

printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
printf("TOTAL A PAGAR: %2.lf \n ",total);
}

else if (opc1==3)
{
subtotal=cantidad*60.00;
total=subtotal;

printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
printf("TOTAL A PAGAR: %2.lf \n ",total);
}

else if (opc1==4)
{
subtotal=cantidad*40.00;
total=subtotal;

printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
printf("TOTAL A PAGAR: %2.lf \n ",total);
}

else if (opc1==5)
{
subtotal=cantidad*30.00;
total=subtotal;

printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
printf("TOTAL A PAGAR: %2.lf \n ",total);
}

else if (opc1==6)
{
subtotal=cantidad*30.00;
total=subtotal;

printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
printf("TOTAL A PAGAR: %2.lf \n ",total);
}

else if (opc1==7)
{
subtotal=cantidad*20.00;
total=subtotal;

printf("EL SUBTOTAL A PAGAR ES DE: %2.lf \n ",subtotal);
printf("TOTAL A PAGAR: %2.lf \n ",total);
}

else
{
printf("ERROR,la opcion no es valida \n ");


}

acumsub+=subtotal;
acumtotal+=total;

printf ("Desea realizar otra compra? \n ");
printf ("1.si \n");
printf ("2.no \n");
scanf ("%d",&opc);

}

printf ("EL SUBTOTAL ES DE: %2.lf,acumsubtotal");
printf ("EL TOTAL A PAGAR ES DE: %2.lf",acumtotal);

getch ();
return 0;
}




Mod: Obligatorio el uso dee etiquetas GeSHi.