Está en la página 1de 6

LILIAN VENUS RAMOS TERAN

PARTICIPACION EN CLASE- ESTRUCTURAS CONDICIONALES


20.Escribir un algoritmo para calcular la fecha del siguiente día a partir de una fecha digitada
desde el teclado por el usuario ( dd, mm, aaaa ) e imprimirla. (tenga en cuenta los años
bisiestos.)

ANALISIS:

ENTRADA PROCESO SALIDA

D M A M DM D M A

26 4 2022 27 4 2022

30 4 2022 1,3,5,7,8,10,12 31 1 5 2022

31 12 2022 4,6,9,11 30 1 1 2023

DISEÑO:

DIAGRAMA DE FLUJO PSEUDOCODIGO


LILIAN VENUS RAMOS TERAN

Proceso EJERCICIO20

Definir D,M,A,DM Como Entero;

Escribir "Ingresar dia";

Leer D;

Escribir "Ingresar MES";

Leer M;

Escribir "Ingresar AÑO";

Leer A;

Segun M Hacer

1,3,5,8,10,12:

DM<-31;

4,6,9,11:

DM<-30;

2:

Si A MOD 4=0
Entonces

DM<-29;

Sino

DM<-28;

FinSi

De Otro Modo:

DM<-0;

Finsegun

Si D<=DM Entonces

Si D<>DM Entonces

D<-D+1;

SiNo

Si M<>12 Entonces

D<-1;

M<-M+1;

SiNo

D<-1;

M<-1;

A<-A+1;
LILIAN VENUS RAMOS TERAN

FinSi

FinSi

Sino

Escribir "FECHA
INCORRECTA";

FinSi

Escribir D, "/",M,"/",A;

FinProceso

PRUEBA DE ESCRITORIO:

ENTRADA PROCESO SALIDA

V1 V2 V3 V4 TV TV<1000000 COM

500000 650000
3000000 4500000 1900000 TV>15000000 1900000
0 0
ANALISIS:

DISEÑO:
LILIAN VENUS RAMOS TERAN

DIAGRAMA DE FLUJO PSEUDOCODIGO


Proceso EJERCICIO26

Definir v1,v2,v3,v4,tv,cm Como Real;

Escribir "VENTA 1";

Leer v1;

Escribir "VENTA 2";

Leer v2;

Escribir "VENTA 3";

Leer v3;

Escribir "VENTA 4";

Leer v4;

tv<-v1+v2+v3+v4;

Si tv<-1000000 Entonces

cm<-tv*0.02;

SiNo

Si tv<-15000000 Entonces

cm<-tv*0.04;

SiNo

cm<-tv*0.1;

FinSi

FinSi

Escribir "TOTAL COMISIONES:",cm;

FinProceso

PRUEBA DE ESCRITORIO:

12.Para un salario bruto hasta de $1500, no hay retención. Para un salario bruto de $1500 a
$3000 el porcentaje retención desde 5%. Para un salario bruto mayor de $3000 el porcentaje
de retención es de 8%. Obtener el nombre del empleado, el salario bruto, el valor de la
retención y el salario neto. Se debe leer el nombre y el salario.
LILIAN VENUS RAMOS TERAN

ENTRADA PROCESO SALIDA

NOMBRE SA <1500 = 0 SN= 1900

JUAN 2000 1500-3000 = 5% R=100

>3000= 8%
ANALISIS:

DISEÑO:

DIAGRAMA DE FLUJO PSEUDOCODIGO


LILIAN VENUS RAMOS TERAN

Proceso EJERCICIO12

Definir SN,SA,R como real;

Definir N como caracter;

Escribir "Ingrese nombre";

Leer N;

Escribir "Ingrese salario";

Leer SA;

Si SA<1500 Entonces

R<-0;

SiNo

Si SA<3000 Entonces

R<-SA*0.05;

SiNo

R<-SA*0.08;

FinSi

FinSi

SN<-SA-R;

Escribir "Salario neto:", SN;

Escribir "Retencion:", R;

FinProceso

PRUEBA DE ESCRITORIO:

También podría gustarte