Pascal/Turbo Pascal - Hola quien me ayuda a crear urgente diagrama flujo en raptor sobre este menu para hoy

 
Vista:
sin imagen de perfil

Hola quien me ayuda a crear urgente diagrama flujo en raptor sobre este menu para hoy

Publicado por Edwin (3 intervenciones) el 19/10/2021 19:43:36
program TIENDA;
uses crt;
var opcion, tbebida, tb, opc2,oph, th, prb, cantidad, total: integer;
tot, precio: real;
nomprod: string;
begin
clrscr;
writeln('****ANTOJITOS WENDY`S****');
writeln('1. VENTAS');
writeln('2. COMPRAS');
writeln('3. SALIR');
writeln('Digita una de las opciones');
readln(opcion);
clrscr;
case opcion of
1:
begin
writeln('****MENU****');
writeln('1. Hamburguesas');
writeln('2. Panecillos Q3.00');
writeln('3. Quesadillas Q15.00');
writeln('4. Burritos Q20.00');
writeln('5. SALIR');
writeln('Las bebidas son naturales y tienen un valor de Q5.00');
writeln('Digita una de las opciones');
readln(opc2);
clrscr;
case opc2 of
1:
begin
writeln('Hamburguesas');
writeln('1. Simple Q15.00');
writeln('2. Con papas Q20.00');
writeln('Digita la opcion');
readln(oph);
if (oph = 1) then
begin
writeln('1. Simple Q15.00');
writeln('Cuantas hamburguesas desea?');
readln(cantidad);
writeln('Desea bebida 1. SI 2. NO?');
readln(prb);
if (prb = 1) then
begin
writeln('cuantas bebidas?');
readln(tbebida);
th:= cantidad * 15;
tb:= tbebida * 5;
total:= th + tb;
writeln('El total a pagar por ',cantidad,' haburguesas y ',tbebida,' bebidas es de Q ',total);
end
else
BEGIN
total:= cantidad * 15;
writeln('El total a pagar por ',cantidad,' haburguesas es de Q ',total);
end;
end;
if (oph = 2) then
begin
writeln('1. Con papas Q20.00');
writeln('Cuantas hamburguesas desea?');
readln(cantidad);
writeln('Desea bebida 1. SI 2. NO?');
readln(prb);
if (prb = 1) then
begin
writeln('cuantas bebidas?');
readln(tbebida);
th:= cantidad * 20;
tb:= tbebida * 5;
total:= th + tb;
writeln('El total a pagar por ',cantidad,' haburguesas y ',tbebida,' bebidas es de Q ',total);
end
else
BEGIN
total:= cantidad * 20;
writeln('El total a pagar por ',cantidad,' haburguesas es de Q ',total);
end;
end;
end;
2:
begin
writeln('Panecillos');
writeln('Ingresa la cantidad que deseas comprar');
readln(cantidad);
writeln('Desea bebida 1. SI 2. NO?');
readln(prb);
if (prb = 1) then
begin
writeln('cuantas bebidas?');
readln(tbebida);
th:= cantidad * 3;
tb:= tbebida * 5;
total:= th + tb;
writeln('El total a pagar por ',cantidad,' panecillos y ',tbebida,' bebidas es de Q ',total);
end
else
BEGIN
total:= cantidad * 3;
writeln('El total a pagar por ',cantidad,' panecillos es de Q ',total);
end;
end;
3:
begin
writeln('Quesadillas');
writeln('Ingresa la cantidad que deseas comprar');
readln(cantidad);
writeln('Desea bebida 1. SI 2. NO?');
readln(prb);
if (prb = 1) then
begin
writeln('cuantas bebidas?');
readln(tbebida);
th:= cantidad * 15;
tb:= tbebida * 5;
total:= th + tb;
writeln('El total a pagar por ',cantidad,' quesadillas y ',tbebida,' bebidas es de Q ',total);
end
else
BEGIN
total:= cantidad * 15;
writeln('El total a pagar por ',cantidad,' quesadillas es de Q ',total);
end;
end;
4:
begin
writeln('Burritos');
writeln('Ingresa la cantidad que deseas comprar');
readln(cantidad);
writeln('Desea bebida 1. SI 2. NO?');
readln(prb);
if (prb = 1) then
begin
writeln('cuantas bebidas?');
readln(tbebida);
th:= cantidad * 20;
tb:= tbebida * 5;
total:= th + tb;
writeln('El total a pagar por ',cantidad,' burritos y ',tbebida,' bebidas es de Q ',total);
end
else
BEGIN
total:= cantidad * 20;
writeln('El total a pagar por ',cantidad,' burritos es de Q ',total);
end;
end;
5:
begin
writeln('Has cancelado la compra');
end;
end;
end;
2:
begin
writeln('****COMPRAS****');
writeln('Digita el nombre del producto comprado');
readln(nomprod);
writeln('Digita la cantidad');
readln(cantidad);
writeln('Digita el precio');
readln(precio);
tot:= cantidad * precio;
writeln('El total a pagar por ',cantidad, nomprod, ' es de Q',tot:2:2);
end;
3:
begin
writeln('Has cancelado la compra');
end;
else
begin
writeln('Opcion incorrecta');
end;
end;
writeln('Gracias por tu preferencia');
writeln('Vuelve pronto');
readkey;
end.
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