Pascal/Turbo Pascal - Ayuda con este prama

 
Vista:
sin imagen de perfil

Ayuda con este prama

Publicado por Luis (14 intervenciones) el 24/04/2015 02:15:46
]amigos necesito ayuda con este programa quisiera saber si me podrían ayudar se los agradecería mucho.




asdasdasdasdasdas
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 24/04/2015 11:17:17
Intentaremos ayudar todo lo que podamos espera un poco.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 24/04/2015 12:10:28
A ver aclárame estos puntos.
el total de 24 productos se refiere por ejemplo a 24 kl de peras pero podrá comprar otros productos,
no se refiere al total comprado sino al total del producto pera.
O se refiere que solo puede comprar 24 diferentes productos y la cantidad que quiera de cada uno.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Ayuda con este prama

Publicado por David (224 intervenciones) el 24/04/2015 12:38:43
Yo entiendo que se refiere que, según el enunciado, la factura no puede contener más de 24 líneas de detalle, sean los productos que sean
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 24/04/2015 13:57:57
Considerare 24 tipos de productos cuales quiera que sean y la cantidad que deseen comenzare así.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 24/04/2015 23:19:49
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{Mira esto como podrás apreciar solo permite 10 clientes por el tamaño de los datos.
 Coméntame si te sirve como va o quieres otro tipo de estructura   }
 
 program facturas;
  uses
     crt;
  const
     max = 24;
     descu1 = 15;
     descu2 = 20;
  type
    pedido = record
         precio  : real;
         cantida : real;
         product : string[80];
         limite  : boolean;
       end;
 
    factura = record
          npedido : integer;
         producto : array[1..max] of pedido;
              pro : integer;
         total    : real;
           IVA    : real;
      total_y_IVA : real;
       end;
 
    var
      cliente : array[1..10] of factura;
      prod, cont : integer;
 
 
  procedure genera_factura(nn : integer);
  var
     z : integer;
  begin
     if cliente[nn].pro > 0 then
     begin
     clrscr;
     gotoxy(20,2);write('Factura Cliente');
     gotoxy(2,3);write('ÚÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ¿');
     gotoxy(2,4);write('³ Numero  ³ Precio Base ³ Cantidad ³ Descuento ³  Total  ³ Total + IVA ³');
     gotoxy(2,5);write('³ Producto³             ³ Productos³           ³         ³             ³');
     gotoxy(2,6);write('ÃÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´');
     if cliente[nn].pro = 1 then
     begin
     gotoxy(2,7);write('³         ³             ³          ³           ³         ³             ³');
     gotoxy(2,8);write('ÃÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´');
     gotoxy(2,9);write('³         ³             ³          ³           ³         ³             ³');
    gotoxy(2,10);write('ÀÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
     end
   else
       begin
     for z := 1 to cliente[nn].pro  do
     begin
     gotoxy(2,6 + z);write('³         ³             ³          ³           ³         ³             ³');
     gotoxy(2,6 + z);write('ÃÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´');
     end;
     gotoxy(2,6 + z);write('³         ³             ³          ³           ³         ³             ³');
    gotoxy(2,6 + (z + 1));write('ÀÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÙ');
    end;
   end
  else
     begin
        writeln('  No hay datos que mostrar pulse una tecla');
        readkey;
     end;
     readkey;
  end;
 
  procedure entrada_pedido;
  var
    pulsa : char;
    no, fin : boolean;
    y, nume : integer;
  begin
      cont := cont + 1;
      prod := 1;
      fin := false;
      writeln;
      write('   Entre Numero Del Pedido : ');
      readln(nume);
      no := false;
      for y := 1 to cont do
      if cliente[y].npedido = nume then
      no := true;
   if no = false then
   begin
      cliente[cont].npedido := nume;
      cliente[cont].producto[prod].limite := false;
    repeat
        clrscr;
        writeln('   Entrada Pedido N. ',nume,' Producto N ',prod);
        writeln;
        write('   Nombre Del Producto : ');
        readln(cliente[cont].producto[prod].product);
        write('   Cantidad En Kls     : ');
        readln(cliente[cont].producto[prod].cantida);
        write('   Precio   Por Kl     : ');
        readln(cliente[cont].producto[prod].precio);
        prod := prod + 1;
        if prod > max then
        begin
           cliente[cont].producto[prod].limite := true;
           writeln('  Tomados Limite De Productos');
           writeln('  Pulse Una Tecla');
           readkey;
           fin := true;
           cliente[cont].pro := max;
        end
    else
       begin
          writeln('  Desea Entrar Mas productos [S/N]');
          repeat
              pulsa := upcase(readkey);
          until pulsa in['S','N'];
          if pulsa = 'N' then
          begin
          cliente[cont].pro := prod;
          fin := true;
          end;
       end;
    until fin = true;
   end
 else
    begin
       writeln('  El numero De Pedido Ya Existe Pulse Una Tecla');
       readkey;
    end;
  end;
 
  procedure reporte;
  begin
     if cont > 0 then
     begin
       genera_factura(1);
     end;
  end;
 
  procedure Menu;
  var
    sal : boolean;
    tecla : char;
  begin
     sal := false;
     cont := 0;
   repeat
       clrscr;
       writeln;
       writeln('    **** Menu Jeneral ****');
       writeln;
       writeln('   [G] = generar factura');
       writeln('   [T] = totales acumulados');
       writeln('   [S] = salir');
       writeln;
       writeln('   <<< Elija Opcion >>>');
       repeat
           tecla := upcase(readkey);
       until tecla in['G','T','S'];
       clrscr;
    case tecla of
 'G' : entrada_pedido;
 'T' : reporte;
 'S' : sal := true;
    end;
   until sal = true;
  end;
 
  begin
     menu;
  end.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Ayuda con este prama

Publicado por Luis (14 intervenciones) el 25/04/2015 16:02:35
disculpa la tardanza no es por kl si no por producto sea cual sea tiene que ser maximo 24 productos lo que hay que comprar la factura me tiene que generar cuantos clientes pasaron que es el primer reglon (numero de producto), osea cuantas veces se genero la factura, despues el precio base que se utilizara, la cactidad de producto que va a comprar, como dice si compra de 12 a 18 producto se hace un descuento de 15%=0.15 y si compra entre 19 a 24 se hace el descuento de 20%=0.20 y si hace menos que si 10 no se hace el descuento despues manda a mostrar el total sin iva y luego el total con iva.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 25/04/2015 22:05:25
De eso se trata de aclarar conceptos y formas para una mejor interpretación de lo que deseas seguimos adelante.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Ayuda con este prama

Publicado por Luis (14 intervenciones) el 25/04/2015 23:47:16
por cierto solo lo puedo hacer con condicionales y ciclos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Ayuda con este prama

Publicado por Luis (14 intervenciones) el 26/04/2015 07:24:36
hasta ahora he echo esto, pero tiene ciertos problemas en el reglon total, y el total + iva y no se como ponerle el descuento en el reglon donde dice descuentos, tambien quisiera hacer para que me salga seguidos pero no se como ayuda.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
Program MENU;
Uses crt;
const
Des=0.15;
Dess=0.20;
Iva=0.12;
Var
Opc, I:integer;
pre,can,s,np:integer;
t,a,b:real;
 
Begin
                     clrscr;
                     for I:=1 to 2 do
                      begin
                       textcolor(9);gotoxy(50,24);write('CARGA DE PRUEBA');
                       textcolor(15);
                       sound(i*200);
                       gotoxy(35,12);write('CARGANDO.    ');delay(200);
                       gotoxy(35,12);write('CARGANDO..    ');delay(200);
                       gotoxy(35,12);write('CARGANDO...    ');delay(200);
                       gotoxy(35,12);write('CARGANDO....    ');delay(200);
                       gotoxy(35,12);write('CARGANDO.....    ');delay(200);
                       gotoxy(35,12);write('CARGANDO......    ');delay(200);
                       gotoxy(35,12);write('CARGANDO.......    ');delay(200);
                       gotoxy(35,12);write('CARGANDO........    ');delay(200);
                       nosound;
                      end;
repeat
 clrscr;
       textcolor(15);
       gotoxy(5,5); writeln('********************** SUPER MERCADO "SI HAY" *****************');
       gotoxy(12,8); writeln('Generar Factura ............ 1');
       gotoxy(12,9); writeln('Generar Totales............ 2');
       gotoxy(12,10); writeln('SALIR ............ 3');
       gotoxy(5,17); writeln('*****************************************************');
       writeln();
       gotoxy(12,20); writeln('Ingrese la opcion que desea ejecutar.....');
       readln (Opc);
       if ((Opc>=1) and (Opc<=3))then
          Begin
       Case(Opc)of
 
                1:begin
                    clrscr;
 
                    np:=0;
                    a:=0;
                    t:=0;
                    b:=0;
                    repeat
                    np:=np+1;
                    begin
 
                writeln ('ingrese precio base');
	            readln (pre);
	            writeln ('ingrese cantidad de productos');
	            readln (can);
	            t:=(pre*can);
 
	            if (can>=12) or (can<=18) then
	            begin
	            a:=(1-Des)*t;
	            end;
	            if (can>=19) or (can<24) then
	            begin
                b:=(1-Dess)*t;
	            end;
 
 
 
                clrscr;
     gotoxy(5,2);writeln ('______________________________________________________________');
	 gotoxy(5,3);writeln ('| Numero  |  Precio|  Cantidad  | Descuento|  Total |  Total |');
	 gotoxy(5,4);writeln ('|Producto |   Base |  Productos |          |        |   +IVA |');
	 gotoxy(5,5);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,6);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,7);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,8);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,9);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,10);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,11);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,12);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,13);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,14);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,15);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,16);writeln ('|Totales  |        |            |          |        |        |');
     gotoxy(5,17);writeln ('|_________|________|____________|__________|________|________|');
     gotoxy(10,6);writeln(np);gotoxy(19,6); writeln (pre);gotoxy(29,6); writeln (can);
     gotoxy(47,6);writeln (t:8:0); gotoxy (48,6); writeln (a:8:1);  gotoxy (48,6); writeln (b:8:1);
 
 
                     readkey;
 
                     clrscr;
 
 
 
                writeln('desea agregar otro producto? Si=1 No=2');
	                readln (s);
	                if ((s<1) or (s>2)) then
	                begin
	                writeln ('Opcion Invalida');
	                end;
	                end;
	                until s=2;
                    readkey;
                    end;
 
                2: begin
                     clrscr;
                     writeln ('SEGUNDO PROGRAMA');
                     readkey;
                     end;
                     end;
          end
          else
          writeln ('OPCION ERRADA, REPITA NUEVAMENTE');
          readkey;
until Opc=3;
End.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 26/04/2015 12:30:33
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{Mira arreglado un poco pero ten en cuenta que cada vez que entres datos de compra los anteriores se anulan
solo quedan en pantalla.
para que pase linea tienes que crear una variable de paso por ejemplo .
paso : integer;
y incrementarla por cada entrada que realices en 2
y el goto pasaría a ser gotoxy(x,5 + paso);write();}
 
Program MENU;
Uses crt;
const
Des=15;
Dess=20;
Iva=12;
Var
Opc, I:integer;
pre,can,s,np:integer;
iv, t,a,b:real;
 
Begin
clrscr;
for I:=1 to 2 do
begin
textcolor(9);gotoxy(50,24);write('CARGA DE PRUEBA');
textcolor(15);
sound(i*200);
gotoxy(35,12);write('CARGANDO. ');delay(200);
gotoxy(35,12);write('CARGANDO.. ');delay(200);
gotoxy(35,12);write('CARGANDO... ');delay(200);
gotoxy(35,12);write('CARGANDO.... ');delay(200);
gotoxy(35,12);write('CARGANDO..... ');delay(200);
gotoxy(35,12);write('CARGANDO...... ');delay(200);
gotoxy(35,12);write('CARGANDO....... ');delay(200);
gotoxy(35,12);write('CARGANDO........ ');delay(200);
nosound;
end;
repeat
clrscr;
textcolor(15);
gotoxy(5,5); writeln('********************** SUPER MERCADO "SI HAY" *****************');
gotoxy(12,8); writeln('Generar Factura ............ 1');
gotoxy(12,9); writeln('Generar Totales............ 2');
gotoxy(12,10); writeln('SALIR ............ 3');
gotoxy(5,17); writeln('*****************************************************');
writeln;
gotoxy(12,20); writeln('Ingrese la opcion que desea ejecutar.....');
readln (Opc);
if ((Opc>=1) and (Opc<=3))then
Begin
Case(Opc)of
 
1:begin
clrscr;
 
np:=0;
a:=0;
t:=0;
b:=0;
repeat
np:=np+1;
begin
 
writeln ('ingrese precio base');
readln (pre);
writeln ('ingrese cantidad de productos');
readln (can);
t:=(pre*can);
 
if (can>=12) or (can<=18) then
begin
a:=(t*Des)/100;
end;
if (can>=19) or (can<24) then
begin
b:=(t*Dess)/100;
end;
 iv := t * iva / 100;
 
 
 
 
 
clrscr;
gotoxy(5,2);writeln ('________________________________________________________________________');
gotoxy(5,3);writeln ('| Numero  | Precio | Cantidad   | Descuent | Total        | Total       |');
gotoxy(5,4);writeln ('|Producto | Base   | Productos  |          |              | +IVA        |');
gotoxy(5,5);writeln ('|---------|--------|------------|----------|--------------|-------------|');
gotoxy(5,6);writeln ('|         |        |            |          |              |             |');
gotoxy(5,7);writeln ('|---------|--------|------------|----------|--------------|-------------|');
gotoxy(5,8);writeln ('|         |        |            |          |              |             |');
gotoxy(5,9);writeln ('|---------|--------|------------|----------|--------------|-------------|');
gotoxy(5,10);writeln('|         |        |            |          |              |             |');
gotoxy(5,11);writeln('|---------|--------|------------|----------|--------------|-------------|');
gotoxy(5,12);writeln('|         |        |            |          |              |             |');
gotoxy(5,13);writeln('|---------|--------|------------|----------|--------------|-------------|');
gotoxy(5,14);writeln('|         |        |            |          |              |             |');
gotoxy(5,15);writeln('|---------|--------|------------|----------|--------------|-------------|');
gotoxy(5,16);writeln('|Totales  |        |            |          |              |             |');
gotoxy(5,17);writeln('|_________|________|____________|__________|______________|_____________|');
gotoxy(10,6);write(np);gotoxy(19,6); write(pre);gotoxy(29,6); write(can);
gotoxy(39,6);write(t:0:2); gotoxy(50,6);write(t:0:2);
if (can>=19) or (can<24) then
begin
gotoxy(39,6);write(b:0:2);
gotoxy(66,6); write(t + iv:0:2);
end;
if (can>=12) or (can<=18) then
begin
gotoxy(39,6);write(a:0:2);
 gotoxy(66,6); write(t + iv:0:2);
end;
 gotoxy(51,16);write(t:0:2);
 
 gotoxy(66,16);write(t + iv :0:2);
 
readkey;
 
clrscr;
 
 
 
 
 
writeln('desea agregar otro producto? Si=1 No=2');
readln (s);
if ((s<1) or (s>2)) then
begin
writeln ('Opcion Invalida');
end;
end;
until s=2;
readkey;
end;
 
2: begin
clrscr;
writeln ('SEGUNDO PROGRAMA');
readkey;
end;
end;
end
else
writeln ('OPCION ERRADA, REPITA NUEVAMENTE');
readkey;
until Opc=3;
End.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Ayuda con este prama

Publicado por Luis (14 intervenciones) el 28/04/2015 21:26:42
buenas amigos tengo un pequeño problema en mi programa hace todo bien pero cuando voy a meter el segundo producto se borra los datos y se vuelven a introducir los nuevos y asi van lo que quiero es que los datos que yo ingrese se queden hay linea por linea ayuda con eso no tiene ningun borrador de pantalla pero igual se borran

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
Program MENU;
//Creado por:Junior Alberto Perez Garcia.
Uses crt;
const
Des=0.15;
Dess=0.20;
Iva=0.12;
Var
Opcc:integer;
Opc, I:integer;
pre,can,np,lugar:integer;
tto,t,ttoo,tot,tal,total:real;
 
 
Begin
                     clrscr;
                     for I:=1 to 2 do
                      begin
                       sound(i*200);
                       gotoxy(35,12);write('CARGANDO.    ');delay(200);
                       gotoxy(35,12);write('CARGANDO..    ');delay(200);
                       gotoxy(35,12);write('CARGANDO...    ');delay(200);
                       gotoxy(35,12);write('CARGANDO....    ');delay(200);
                       gotoxy(35,12);write('CARGANDO.....    ');delay(200);
                       gotoxy(35,12);write('CARGANDO......    ');delay(200);
                       gotoxy(35,12);write('CARGANDO.......    ');delay(200);
                       gotoxy(35,12);write('CARGANDO........    ');delay(200);
                       nosound;
                      end;
repeat
	   clrscr;
       textcolor(15);
       gotoxy(5,5); writeln('********************** SUPER MERCADO "SI HAY" *****************');
       gotoxy(12,8);writeln('Generar Factura ............ 1');
       gotoxy(12,9);writeln('Generar Totales............ 2');
       gotoxy(12,10);writeln('SALIR ............ 3');
       gotoxy(5,17); writeln('*****************************************************');
       writeln();
       gotoxy(12,20); writeln('Ingrese la opcion que desea ejecutar.....');
       readln (Opc);
       if ((Opc>=1) and (Opc<=3))then
          Begin
       Case(Opc)of
 
                1:begin
                    np:=0;
                    lugar:=-1;
                    repeat
                    np:=np+1;
                    lugar:=lugar+1;
 
					textcolor (3);
     gotoxy(5,2);writeln ('______________________________________________________________');
	 gotoxy(5,3);writeln ('| Numero  |  Precio|  Cantidad  | Descuento|  Total |  Total |');
	 gotoxy(5,4);writeln ('|Producto |   Base |  Productos |          |        |   +IVA |');
	 gotoxy(5,5);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,6);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,7);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,8);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,9);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,10);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,11);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,12);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,13);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,14);writeln ('|         |        |            |          |        |        |');
	 gotoxy(5,15);writeln ('|---------|--------|------------|----------|--------|--------|');
	 gotoxy(5,16);writeln ('|Totales  |        |            |          |        |        |');
     gotoxy(5,17);writeln ('|_________|________|____________|__________|________|________|');
     gotoxy(7,6+lugar);writeln(np);
     //gotoxy(19,6+lugar); writeln (pre);
     //gotoxy(29,6+lugar); writeln (can);
					//writeln ('Ingrese Precio Base');
					gotoxy(17,6+lugar); readln (pre);
					//writeln ('Ingrese Cantidad De Productos');
					gotoxy(26,6+lugar); readln (can);
					t:=(pre*can);
 
     if ((can>=1) and (can<12)) then
 
     t:=can*pre;
     tto:=(1+Iva)*t;
     gotoxy(47,6+lugar);writeln (t:8:0);
     gotoxy (43,6+lugar); writeln (0);
     gotoxy (58,6+lugar); writeln (tto:8:1);
 
 
     if ((can>=12) and (can<=18)) then
 
     t:=can*pre;
     ttoo:=(1-Des)*t;
     tot:=(1+Iva)*ttoo;
     gotoxy(47,6+lugar);writeln (ttoo:8:0);
     gotoxy (37,6+lugar); writeln (Des:8:2);
     gotoxy (58,6+lugar); writeln (tot:8:2);
 
 
     if ((can>=19) and (can<=24)) then
 
     t:=can*pre;
     tal:=(1-Dess)*t;
     total:=(1+Iva)*tal;
     gotoxy(47,6+lugar);writeln (tal:8:0);
     gotoxy (37,6+lugar); writeln (Dess:8:2);
     gotoxy (58,6+lugar); writeln (total:8:2);
 
 
                     readkey;
 
                 textcolor (7);
                gotoxy(15,22); writeln('desea agregar otro producto? Si=1 o  No=2');
	                readln (Opcc);
 
 
	                if (Opcc<=0) or (Opcc>2) then
	                begin
	                writeln ('Opcion Invalida');
	                end;
 
	                until (Opcc=2);
 
                    end;
 
                2: begin
                     clrscr;
                     writeln ('SEGUNDO PROGRAMA');
                     readkey;
                     end;
                     end;
          end
          else
          writeln ('OPCION ERRADA, REPITA NUEVAMENTE');
          readkey;
until Opc=3;
End.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Ayuda con este prama

Publicado por Luis (14 intervenciones) el 28/04/2015 22:18:17
Listo la atenrior pregunta quedo resulta ahora la pregunta es de que manera genero los totales. o sacarle el promedio ya lo ultimo del programa si pueden leer el enunciado que publique
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 29/04/2015 10:50:12
Tendrás que tener unas variables que te recojan la suma de los totales de cada entrada eso seria
total := total + (pre*can) esto te dará el total de factura.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Ayuda con este prama

Publicado por Luis (14 intervenciones) el 29/04/2015 17:59:37
bueno amigos gracias a ustedes ya esta casi listo el programa le doy las mil gracias por informarme y ayudarme en mis dudas ahora solo falta una pregunta como genero esto

El reporte de los totales debe mostrar al menos los siguientes datos: total de
clientes atendidos (total de facturas), Total de productos vendidos, promedio de
productos vendidos por cliente, monto total vendido sin iva, monto total otorgado en
descuentos, monto total recolectado del IVA.

eso va en la opcion 2 del menu de que manera lo puedo hacer?

apenas este listo el programa lo paso para que vean como quedo
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Ayuda con este prama

Publicado por ramon (2158 intervenciones) el 29/04/2015 21:54:24
Perdona todo e so supone la creación de variables para la suma de cada
punto que expones y colocarlas en el programa para que recojan esos
datos que quieres.
No entiendo como para lo que estas pidiendo no as empleado un registro
con lo cual con la mitad de esfuerzo tendrías todo.
Pero ese tema pertenece a la persona que expone esas tareas sin
explicar el como te deseo suerte.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar