CODIGO EN C

Páginas: 2 (301 palabras) Publicado: 21 de mayo de 2015
CODIGO EN C++ TIENDA BORLAN (POO)
EL SIGUIENTE CODIGO EN C++  A SIDO COMPILADO EN BORLAN C++,PERO DE IGUAL MANERA PUEDE SERVIR EN DEV C++ O ALGUN OTRO,EN EL CASO DE DEVC++ SOLO ES CUESTIO DE QUEQUITEMOS LOS GOTOXY() Y LISTO...
EL CODIGO SIGUIETE PERMITE CALCULA EL COSTO EL SUBTOTAL Y TOTAL DE LAS COMPRAS DE UN CLIENTE ... APLICANDO UN DESCUENTO  A ALGUNAS DE SUS COMPRAS.... A COMTINUACIONSE MUESTRA COMO APARECERA EN PANTALA...


EN ESTE CASO A ALGUNOS PRODUCTOS LES HEMOS APLICADO UN DESCUENTO
Y AL COSTO TOTAL CUANDO ESTE ES PAGADO AL CONTADO...

 #include
  #include
  #define   P_BROCHAS 10
  #define   P_RODILLOS 15
  #define   P_SELLADORES 20
 class  Tienda
  {
   int num_brochas,num_rodillos,num_selladores;
   floatbrochas,rodillos,selladores,total_credito,total_contado;
    public:
  int cant_art()
    {
       printf("Ingrese la cantidad de brochas de serda\n\n  ");
       scanf("%i",&num_brochas);
       printf("Ingrese la cantidad derodillos\n\n  ");
       scanf("%i",&num_rodillos);
       printf("Ingrese la cantidad de sellador\n\n  ");
       scanf("%i", &num_selladores);
   }
 int precio_subtotal()
 {
   brochas=num_brochas*P_BROCHAS-(num_brochas*P_BROCHAS*.20);
//COMENTARIO...SE LE DESCUENTA EL 20% 
    rodillos=num_rodillos*P_RODILLOS-(num_rodillos*P_RODILLOS*.15);
//COMENTARIO...SE LE DESCUENTA EL 15%
   selladores=(num_selladores*P_SELLADORES);
 }
   int total()
   {
   printf(" total brochas       %.2f \n",brochas);
   printf(" total rodillos     %.2f \n",rodillos);
   printf("total selladores    %.2f\n\n\n",selladores);
   }
   int total_contado_credito()
     {
     printf("******************\n ");
     printf("total a contado\n    ");
    total_contado=brochas+rodillos+selladores-(brochas+rodillos+selladores*.07);
//COMENTARIO...SE LE DESCUENTA EL 7%
     printf("  %.2f \n\n \n",total_contado);
     printf("total a credito\n   ");
     total_credito=brochas+rodillos+selladores;
     printf(" ...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • codigos c++
  • Codigos en c++
  • Codigo C++
  • Codigo c++ biulder
  • Codigo Detest Visual C#
  • Codigo c y pseudocodigo
  • codigo en C++ basico
  • Código En C De La Curp y Rfc

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS