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

 

 


Tema destacado: AIO elhacker.NET 2021 Compilación herramientas análisis y desinfección malware


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 [8] 9
71  Programación / Programación C/C++ / Re: Programacion Factura: DevC++ en: 26 Abril 2015, 01:23 am


Mira Como Sale

primero inicializa los valores a 0 so lo que quieres decir  efectivo=0 asi
72  Programación / Programación C/C++ / Re: Programacion Factura: DevC++ en: 26 Abril 2015, 01:00 am
Yo Estoy Haciendo  Una Factura como los del Supermercados


yo quiero realizar una compra de 5 productos
si el total me hace 1,500 pesos    y yo le doy 2000 pesos  yo quiero que me diga la devuelta es de (Como Hacen Con la Factura)
ejemplo               itbis(0.18*precio)                  precio RD$

Arroz                                                             200
Pollo                                                              300
Bizcocho                                                        500
Salchicha                                                       225
Jugo                                                               50


                                                          Total=la suma de los precios

73  Programación / Programación C/C++ / Re: Programacion Factura: DevC++ en: 26 Abril 2015, 00:51 am
Bueno me sale asi

me sale lo mismo que total siempre no se resta  solo se queda igual

Descripcion:               ITBIS:                Precio:RD$

Pollo                           40.50                          225



Efectivo:1000

Devuelta:225.00
74  Programación / Programación C/C++ / Programacion Factura: DevC++ en: 26 Abril 2015, 00:36 am
Una Pregunta Sencilla Como Hago Para Que Me Digita La Devuelta

Código
  1. #include<stdio.h>
  2. #include<conio.c>
  3.  
  4. char Descripcion[40];
  5. int s=5,x=0;
  6.  
  7. float devuelta,Efectivo,tsueldo,itbis,Precio;
  8.  
  9. main()
  10.  
  11. {
  12.      textbackground(WHITE);
  13.      textcolor(6);
  14.      clrscr();
  15.      gotoxy(10,1);printf("------------------------------------------------------------------");
  16.      gotoxy(27,2);printf("FACTURA PARA EL CONSUMIDOR");
  17.      gotoxy(10,3);printf("------------------------------------------------------------------");
  18.      gotoxy(10,4);printf("Descripcion                Itbis                      Precio RD$");
  19.      gotoxy(10,5);printf("------------------------------------------------------------------");
  20.      gotoxy(10,18);printf("------------------------------------------------------------------");
  21.      gotoxy(52,17);printf("Total-->RD$");
  22.      gotoxy(30,21);printf("Efectivo:");
  23.      gotoxy(30,23);printf("Devuelta:");
  24.     for(x=1; x<=10; x=x+1)
  25.  
  26.      {
  27.          s=s+1;
  28.          fflush(stdin);
  29.          gotoxy(10,s);scanf("%s",&Descripcion);
  30.          gotoxy(66,s);scanf("%f",&Precio);
  31.          tsueldo=tsueldo+Precio;
  32.          itbis=0.18*Precio;
  33.          devuelta=tsueldo-Efectivo;
  34.          gotoxy(64,17);printf("%.2f",tsueldo);
  35.          gotoxy(38,s);printf("%.2f",itbis);
  36.          gotoxy(40,23);printf("%.2f",devuelta);
  37.          gotoxy(40,21);scanf("%f",&Efectivo);
  38.      }
  39.  
  40.  
  41. getch();          
  42.  
  43. }

Mod: Código resaltado con etiquetas GeSHi
75  Programación / Programación C/C++ / Re: Ayudame Con C++ en: 22 Abril 2015, 03:42 am
Código:
scanf("%d", &tipo); En Vez De %d puse %s porque no me deja brincar a la cantidad vuelve a fabricante , y lo de total ya lo arregle

Sale Asi

Fabricante:POLO     TIPO:Camisa     Cantidad:2   Precio:100




Código:
Total>:10737472101.00
76  Programación / Programación C/C++ / Ayudame Con C++ en: 22 Abril 2015, 03:02 am
Tengo un Problemita   estoy haciendo un programa de tienda

ejemplo

Fabricante:Polo   Tipo:Camisa   Cantidad:2        Precio:US$2000


yo quiero que la cantidad se multiplica con el precio pero no me deja


Código
  1. #include<stdio.h>
  2. #include<conio.c>
  3.  
  4. char fabricante[40];
  5. int cant,x=0,s=5,tipo;
  6. float descuento,tsueldo,precio,total;
  7.  
  8. main()
  9. {
  10.       gotoxy(1,2);printf("%c",186);
  11.       gotoxy(1,3);printf("%c",186);
  12.       gotoxy(1,4);printf("%c",186);
  13.       gotoxy(1,5);printf("%c",186);
  14.       gotoxy(1,6);printf("%c",186);
  15.       gotoxy(1,7);printf("%c",186);
  16.       gotoxy(1,8);printf("%c",186);
  17.       gotoxy(1,9);printf("%c",186);
  18.       gotoxy(1,10);printf("%c",186);
  19.       gotoxy(1,11);printf("%c",186);
  20.       gotoxy(1,12);printf("%c",186);
  21.       gotoxy(1,13);printf("%c",186);
  22.       gotoxy(1,14);printf("%c",186);
  23.       gotoxy(1,15);printf("%c",186);
  24.       gotoxy(1,16);printf("%c",186);
  25.       gotoxy(1,17);printf("%c",186);
  26.       gotoxy(1,17);printf("%c",200);
  27.       gotoxy(2,17);printf("%c",205);
  28.       gotoxy(3,17);printf("%c",205);
  29.       gotoxy(4,17);printf("%c",205);
  30.       gotoxy(5,17);printf("%c",205);
  31.       gotoxy(6,17);printf("%c",205);
  32.       gotoxy(7,17);printf("%c",205);
  33.       gotoxy(8,17);printf("%c",205);
  34.       gotoxy(9,17);printf("%c",205);
  35.       gotoxy(10,17);printf("%c",205);
  36.       gotoxy(11,17);printf("%c",205);
  37.       gotoxy(12,17);printf("%c",205);
  38.       gotoxy(13,17);printf("%c",205);
  39.       gotoxy(14,17);printf("%c",205);
  40.       gotoxy(15,17);printf("%c",205);
  41.       gotoxy(16,17);printf("%c",205);
  42.       gotoxy(17,17);printf("%c",205);
  43.       gotoxy(18,17);printf("%c",205);
  44.       gotoxy(19,17);printf("%c",205);
  45.       gotoxy(20,17);printf("%c",205);
  46.       gotoxy(21,17);printf("%c",205);
  47.       gotoxy(22,17);printf("%c",205);
  48.       gotoxy(23,17);printf("%c",205);
  49.       gotoxy(24,17);printf("%c",205);
  50.       gotoxy(25,17);printf("%c",205);
  51.       gotoxy(26,17);printf("%c",205);
  52.       gotoxy(27,17);printf("%c",205);
  53.       gotoxy(28,17);printf("%c",205);
  54.       gotoxy(29,17);printf("%c",205);
  55.       gotoxy(30,17);printf("%c",205);
  56.       gotoxy(31,17);printf("%c",205);
  57.       gotoxy(32,17);printf("%c",205);
  58.       gotoxy(33,17);printf("%c",205);
  59.       gotoxy(34,17);printf("%c",205);
  60.       gotoxy(35,17);printf("%c",205);
  61.       gotoxy(36,17);printf("%c",205);
  62.       gotoxy(37,17);printf("%c",205);
  63.       gotoxy(38,17);printf("%c",205);
  64.       gotoxy(39,17);printf("%c",205);
  65.       gotoxy(40,17);printf("%c",205);
  66.       gotoxy(41,17);printf("%c",205);
  67.       gotoxy(42,17);printf("%c",205);
  68.       gotoxy(43,17);printf("%c",205);
  69.       gotoxy(44,17);printf("%c",205);
  70.       gotoxy(45,17);printf("%c",205);
  71.       gotoxy(46,17);printf("%c",205);
  72.       gotoxy(47,17);printf("%c",205);
  73.       gotoxy(48,17);printf("%c",205);
  74.       gotoxy(49,17);printf("%c",205);
  75.       gotoxy(50,17);printf("%c",205);
  76.       gotoxy(51,17);printf("%c",205);
  77.       gotoxy(52,17);printf("%c",205);
  78.       gotoxy(53,17);printf("%c",205);
  79.       gotoxy(54,17);printf("%c",205);
  80.       gotoxy(55,17);printf("%c",205);
  81.       gotoxy(56,17);printf("%c",205);
  82.       gotoxy(57,17);printf("%c",205);
  83.       gotoxy(58,17);printf("%c",205);
  84.       gotoxy(59,17);printf("%c",205);
  85.       gotoxy(60,17);printf("%c",205);
  86.       gotoxy(61,17);printf("%c",205);
  87.       gotoxy(62,17);printf("%c",205);
  88.       gotoxy(63,17);printf("%c",205);
  89.       gotoxy(64,17);printf("%c",205);
  90.       gotoxy(65,17);printf("%c",205);
  91.       gotoxy(66,17);printf("%c",205);
  92.       gotoxy(67,17);printf("%c",205);
  93.       gotoxy(68,17);printf("%c",205);
  94.       gotoxy(69,17);printf("%c",205);
  95.       gotoxy(70,17);printf("%c",205);
  96.       gotoxy(71,17);printf("%c",205);
  97.       gotoxy(72,17);printf("%c",205);
  98.       gotoxy(73,17);printf("%c",205);
  99.       gotoxy(74,17);printf("%c",205);
  100.       gotoxy(75,17);printf("%c",205);
  101.       gotoxy(76,17);printf("%c",205);
  102.       gotoxy(77,17);printf("%c",205);
  103.       gotoxy(78,17);printf("%c",205);
  104.       gotoxy(79,17);printf("%c",205);
  105.       gotoxy(80,17);printf("%c",188);
  106.       gotoxy(80,16);printf("%c",186);
  107.       gotoxy(80,15);printf("%c",186);
  108.       gotoxy(80,14);printf("%c",186);
  109.       gotoxy(80,13);printf("%c",186);
  110.       gotoxy(80,12);printf("%c",186);
  111.       gotoxy(80,11);printf("%c",186);
  112.       gotoxy(80,10);printf("%c",186);
  113.       gotoxy(80,9);printf("%c",186);
  114.       gotoxy(80,8);printf("%c",186);
  115.       gotoxy(80,7);printf("%c",186);
  116.       gotoxy(80,6);printf("%c",186);
  117.       gotoxy(80,5);printf("%c",186);
  118.       gotoxy(80,4);printf("%c",186);
  119.       gotoxy(80,3);printf("%c",186);
  120.       gotoxy(80,2);printf("%c",187);
  121.  
  122.       gotoxy(1,2);printf("%c",201);
  123.       gotoxy(2,2);printf("%c",205);
  124.       gotoxy(3,2);printf("%c",205);
  125.       gotoxy(4,2);printf("%c",205);
  126.       gotoxy(5,2);printf("%c",205);
  127.       gotoxy(6,2);printf("%c",205);
  128.       gotoxy(7,2);printf("%c",205);
  129.       gotoxy(8,2);printf("%c",205);
  130.       gotoxy(9,2);printf("%c",205);
  131.       gotoxy(10,2);printf("%c",205);
  132.       gotoxy(11,2);printf("%c",205);
  133.       gotoxy(12,2);printf("%c",205);
  134.       gotoxy(13,2);printf("%c",205);
  135.       gotoxy(14,2);printf("%c",205);
  136.       gotoxy(15,2);printf("%c",205);
  137.       gotoxy(16,2);printf("%c",205);
  138.       gotoxy(17,2);printf("%c",205);
  139.       gotoxy(18,2);printf("%c",205);
  140.       gotoxy(19,2);printf("%c",205);
  141.       gotoxy(20,2);printf("%c",205);
  142.       gotoxy(21,2);printf("%c",205);
  143.       gotoxy(22,2);printf("%c",205);
  144.       gotoxy(23,2);printf("%c",205);
  145.       gotoxy(24,2);printf("%c",205);
  146.       gotoxy(25,2);printf("%c",205);
  147.       gotoxy(26,2);printf("%c",205);
  148.       gotoxy(27,2);printf("%c",205);
  149.       gotoxy(28,2);printf("%c",205);
  150.       gotoxy(29,2);printf("%c",205);
  151.       gotoxy(30,2);printf("%c",205);
  152.       gotoxy(31,2);printf("%c",205);
  153.       gotoxy(32,2);printf("%c",205);
  154.       gotoxy(33,2);printf("%c",205);
  155.       gotoxy(34,2);printf("%c",205);
  156.       gotoxy(35,2);printf("%c",205);
  157.       gotoxy(36,2);printf("%c",205);
  158.       gotoxy(37,2);printf("%c",205);
  159.       gotoxy(38,2);printf("%c",205);
  160.       gotoxy(39,2);printf("%c",205);
  161.       gotoxy(40,2);printf("%c",205);
  162.       gotoxy(41,2);printf("%c",205);
  163.       gotoxy(42,2);printf("%c",205);
  164.       gotoxy(43,2);printf("%c",205);
  165.       gotoxy(44,2);printf("%c",205);
  166.       gotoxy(45,2);printf("%c",205);
  167.       gotoxy(46,2);printf("%c",205);
  168.       gotoxy(47,2);printf("%c",205);
  169.       gotoxy(48,2);printf("%c",205);
  170.       gotoxy(49,2);printf("%c",205);
  171.       gotoxy(50,2);printf("%c",205);
  172.       gotoxy(51,2);printf("%c",205);
  173.       gotoxy(52,2);printf("%c",205);
  174.       gotoxy(53,2);printf("%c",205);
  175.       gotoxy(54,2);printf("%c",205);
  176.       gotoxy(55,2);printf("%c",205);
  177.       gotoxy(56,2);printf("%c",205);
  178.       gotoxy(57,2);printf("%c",205);
  179.       gotoxy(58,2);printf("%c",205);
  180.       gotoxy(59,2);printf("%c",205);
  181.       gotoxy(60,2);printf("%c",205);
  182.       gotoxy(61,2);printf("%c",205);
  183.       gotoxy(62,2);printf("%c",205);
  184.       gotoxy(63,2);printf("%c",205);
  185.       gotoxy(64,2);printf("%c",205);
  186.       gotoxy(65,2);printf("%c",205);
  187.       gotoxy(66,2);printf("%c",205);
  188.       gotoxy(67,2);printf("%c",205);
  189.       gotoxy(68,2);printf("%c",205);
  190.       gotoxy(69,2);printf("%c",205);
  191.       gotoxy(70,2);printf("%c",205);
  192.       gotoxy(71,2);printf("%c",205);
  193.       gotoxy(72,2);printf("%c",205);
  194.       gotoxy(73,2);printf("%c",205);
  195.       gotoxy(74,2);printf("%c",205);
  196.       gotoxy(75,2);printf("%c",205);
  197.       gotoxy(76,2);printf("%c",205);
  198.       gotoxy(77,2);printf("%c",205);
  199.       gotoxy(78,2);printf("%c",205);
  200.       gotoxy(79,2);printf("%c",205);
  201.         gotoxy(2,5);printf("%c",205);
  202.       gotoxy(3,5);printf("%c",205);
  203.       gotoxy(4,5);printf("%c",205);
  204.       gotoxy(5,5);printf("%c",205);
  205.       gotoxy(6,5);printf("%c",205);
  206.       gotoxy(7,5);printf("%c",205);
  207.       gotoxy(8,5);printf("%c",205);
  208.       gotoxy(9,5);printf("%c",205);
  209.       gotoxy(10,5);printf("%c",205);
  210.       gotoxy(11,5);printf("%c",205);
  211.       gotoxy(12,5);printf("%c",205);
  212.       gotoxy(13,5);printf("%c",205);
  213.       gotoxy(14,5);printf("%c",205);
  214.       gotoxy(15,5);printf("%c",205);
  215.       gotoxy(16,5);printf("%c",205);
  216.       gotoxy(17,5);printf("%c",205);
  217.       gotoxy(18,5);printf("%c",205);
  218.       gotoxy(19,5);printf("%c",205);
  219.       gotoxy(20,5);printf("%c",205);
  220.       gotoxy(21,5);printf("%c",205);
  221.       gotoxy(22,5);printf("%c",205);
  222.       gotoxy(23,5);printf("%c",205);
  223.       gotoxy(24,5);printf("%c",205);
  224.       gotoxy(25,5);printf("%c",205);
  225.       gotoxy(26,5);printf("%c",205);
  226.       gotoxy(27,5);printf("%c",205);
  227.       gotoxy(28,5);printf("%c",205);
  228.       gotoxy(29,5);printf("%c",205);
  229.       gotoxy(30,5);printf("%c",205);
  230.       gotoxy(31,5);printf("%c",205);
  231.       gotoxy(32,5);printf("%c",205);
  232.       gotoxy(33,5);printf("%c",205);
  233.       gotoxy(34,5);printf("%c",205);
  234.       gotoxy(35,5);printf("%c",205);
  235.       gotoxy(36,5);printf("%c",205);
  236.       gotoxy(37,5);printf("%c",205);
  237.       gotoxy(38,5);printf("%c",205);
  238.       gotoxy(39,5);printf("%c",205);
  239.       gotoxy(40,5);printf("%c",205);
  240.       gotoxy(41,5);printf("%c",205);
  241.       gotoxy(42,5);printf("%c",205);
  242.       gotoxy(43,5);printf("%c",205);
  243.       gotoxy(44,5);printf("%c",205);
  244.       gotoxy(45,5);printf("%c",205);
  245.       gotoxy(46,5);printf("%c",205);
  246.       gotoxy(47,5);printf("%c",205);
  247.       gotoxy(48,5);printf("%c",205);
  248.       gotoxy(49,5);printf("%c",205);
  249.       gotoxy(50,5);printf("%c",205);
  250.       gotoxy(51,5);printf("%c",205);
  251.       gotoxy(52,5);printf("%c",205);
  252.       gotoxy(53,5);printf("%c",205);
  253.       gotoxy(54,5);printf("%c",205);
  254.       gotoxy(55,5);printf("%c",205);
  255.       gotoxy(56,5);printf("%c",205);
  256.       gotoxy(57,5);printf("%c",205);
  257.       gotoxy(58,5);printf("%c",205);
  258.       gotoxy(59,5);printf("%c",205);
  259.       gotoxy(60,5);printf("%c",205);
  260.       gotoxy(61,5);printf("%c",205);
  261.       gotoxy(62,5);printf("%c",205);
  262.       gotoxy(63,5);printf("%c",205);
  263.       gotoxy(64,5);printf("%c",205);
  264.       gotoxy(65,5);printf("%c",205);
  265.       gotoxy(66,5);printf("%c",205);
  266.       gotoxy(67,5);printf("%c",205);
  267.       gotoxy(68,5);printf("%c",205);
  268.       gotoxy(69,5);printf("%c",205);
  269.       gotoxy(70,5);printf("%c",205);
  270.       gotoxy(71,5);printf("%c",205);
  271.       gotoxy(72,5);printf("%c",205);
  272.       gotoxy(73,5);printf("%c",205);
  273.       gotoxy(74,5);printf("%c",205);
  274.       gotoxy(75,5);printf("%c",205);
  275.       gotoxy(76,5);printf("%c",205);
  276.       gotoxy(77,5);printf("%c",205);
  277.       gotoxy(78,5);printf("%c",205);
  278.       gotoxy(79,5);printf("%c",205);
  279.  
  280.       gotoxy(34,4);printf("ALEO'S MODA");
  281.       gotoxy(2,6);printf("Fabricante:          Tipo:            Cantidad:             Precio:RD$        ");    
  282.       gotoxy(30,16);printf("TOTAL=>:RD$");    
  283.  
  284.       for(x=1; x<=5;  x=x+1)
  285.       {
  286.          s=s+1;
  287.          fflush(stdin);
  288.          gotoxy(13,s); gets (fabricante);
  289.          gotoxy(28,s);scanf("%s",&tipo);
  290.          gotoxy(50,s);scanf("%i",&cant);
  291.          gotoxy(72,s);scanf("%.2f",&precio);
  292.          total=cant*precio;
  293.          gotoxy(44,16);printf("%.2f",&total);
  294.          }
  295.  
  296.       getch();
  297.  
  298.  
  299.  
  300. }
77  Programación / Programación C/C++ / Re: DEVC++ AYUDA! PorFavor en: 11 Abril 2015, 03:08 am
GRACIAS !!!!!!!!!!!!!!! COLLINS


78  Programación / Programación C/C++ / Re: DEVC++ AYUDA! PorFavor en: 11 Abril 2015, 02:34 am
cant de dolares es cualquiera no 200


gotoxy(1,1);printf("================================================================================");
gotoxy(1,4);printf("================================================================================");
gotoxy(34,2);printf("Casa Cambio");
gotoxy(1,6);printf("Cant.Dolares:              Equivalente.Peso:                Equivalente.G:");
gotoxy(18,6);scanf("%f",&US);
gotoxy(1,16);printf("================================================================================");
gotoxy(26,18);printf("Cant.Cambiado==>");
gotoxy(60,18);printf("Total:==>");
for(x=1; x<=5; x=x+1);
{
if(cant<=500)
peso=40*cant;
HTG=45*cant;

else if (cant>501){
peso=45*cant;
HTG=50*cant;
}

gotoxy(48,6);printf("%.2f",peso);
gotoxy(76,6);printf("%.2f",HTG);
if(cant>=500)ct=ct+1;
else ct=ct+1;
gotoxy(44,18);printf("%i%",ct);
                                     
                       
}
getch();
}
79  Programación / Programación C/C++ / Re: DEVC++ AYUDA! PorFavor en: 11 Abril 2015, 02:12 am
me sale asi



CANT.DOLAR: 200        Equivalente.peso: 0      Equivalente.Euro: 0
80  Programación / Programación C/C++ / Re: DEVC++ AYUDA! PorFavor en: 11 Abril 2015, 01:46 am
quiero cambiar dinero  como te explico mejor    si  cantidad de dinero que quiero cambiar es menor que 500  la tasa de peso(que es 40) se multiplica por la cantidad que digite   y la tase del euro(que es 45) se multiplica por la cantidad que digite ahore la cantidad de dinero que quiero cambiar es mayor que 500  la tasa del peso (es 45) y la del euro (es 50)


Ejemplo


Cant.Dolares : 200          Equivalente a peso:           Equivalente a Euro:


Páginas: 1 2 3 4 5 6 7 [8] 9
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines