18
DI GR M DE FLUJO 1.- Area de un cuadrado Inicio L  A= L*L  A Fin  2.- Area de un Circulo Inicio r  A= pi*r*r  A Fin  3.- Conversión Fahrenheit a Celsius Inicio F C=(5/9)*(f-32) C Fin  

DIAGRAMA DE FLUJO.pdf

Embed Size (px)

Citation preview

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 1/18

DI GR M DE FLUJO

1.- Area de un cuadrado

Inicio

L

 A= L*L

 A

Fin

 

2.- Area de un Circulo

Inicio

 A= pi*r*r 

 A

Fin 

3.- Conversión Fahrenheit a Celsius

Inicio

F

C=(5/9)*(f-32)

C

Fin 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 2/18

4.- Suma y Resta de dos Números.

Inicio

a,b

s=a+b

s,r 

Fin

R=a-b

 

5.- Mayor de dos Números.

Inicio

a,b

Mayor b

Fin

a<b

a=b

Mayor a   Iguales

no si

no si

 

6.- Pascua.

Inicio

 Año

Fin

 A=año mod 19

B=año mod 4

C=año mod 7

D=(19*a+24)mod 30

  E=(2b+4c+6d+5) mod 7

Dia=22+d+e

dia<=31

Dia,marzo

no si

Dia-31,abril

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 3/18

7.- Area de un triangulo.

Inicio

a,b,c

Fin

p=(a+b+c)/2

 Area

 Area=sqrt(p(p-a)(p-b)(p-c))

 

8.- Bisiesto.

Inicio

a,b,c

Fin

 Año mod 4=0 y

año mod 100<>0 y

año mod 400=0

BisiestoNo bisiesto

no

 

9.- Mayor de tres Números

Inicio

a,b,c

Fin

a>bno si

a>cb>c

Mayor aMayor cMayor b

no nosi si

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 4/18

10.- Ecuación de segundo grado.

Inicio

año

Fin

d<=0no si

D=b*b-4*a*c

x1=-b+sqrt(d)/2a

x2=-b-sqrt(d)/2a

D=d*(-1)

x=-b/(2*a)

I=sqrt(d)/(2a)

x1,x2 x,i

 

11.- Sistema de ecuaciones de 2*2.

Inicio

a,b,c,d,e,f 

Fin

x=(c*c-b*f)/(a*c-b*d)

x,y

y=(a*f-c*d)/(a*c-b*d)

 

12.- Generar la serie:

1 2 3 4 5 6 7. . . .

Inicio

N

Fin

i

I=1 to N

I

Inicio

N

I=0

I=n

I=I+1

Ino

Fin

si

Inicio

N

I=0

I=n

I=I+1

I

si   Fin

no

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 5/18

 

13.- Generar la serie:

1  3 5 7 . . . .

Inicio

N

Fin

2*I-1

I=1 to N

I

Inicio

N

I=0

I=n

I=I+1

2*I-1no

Fin

si

Inicio

N

I=0

I=n

I=I+1

2*I-1

si   Fin

no

 

14.- Generar la serie:2  4 6 8 . . . .

Inicio

N

Inicio

N

I=0

 A=0

I=n

I=I+1

 A=A+2

2*I-1no

Fin

si

Inicio

N

I=0

 A=0

I=n

I=I+1

 A=A+2

2*I-1

si

Finno

 A=0

Fin

 A

I=1 to N

I

 A=A+2

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 6/18

15.- Generar la serie (FIBONACCI).

1  1 2 3 5 8 13 . . .

Inicio

N

Inicio

N

I=0

 A=1

B=1

I=n

 A

no

Fin

si

Inicio

N

I=0

 A=1

B=1

I=n

 A

siFin

no

 A=1

B=1

Fin

 A

I=1 to N

I

C=A+B

 A=BB=C

I=I+1

C=A+B

 A=B

B=C

I=I+1

C=A+B

 A=B

B=C

16.- Generar la serie:

1  2 6 15 31 . . .

Inicio

N

Inicio

N

I=0

S=1

I=n

S

no

Fin

si

Inicio

N

I=0

S=1

I=n

S

siFin

no

s=1

Fin

S

I=1 to N

I

S=S+I*1

I=I+1

S=S+I*1

I=I+1

S=S+I*1

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 7/18

17.- Hallar el Factorial

N! 4!=1*2*3*4=24

Inicio

N

Inicio

N

I=0

F=1

I=n

no

Fin

si

Inicio

N

I=0

F=1

I=n

si

Fin

no

F=1

Fin

I=1 to N

I

F=F*I

I=I+1

F=F*I

I=I+1

F=F*I

S

F

F

18.- Generar la serie:

1/1! , 2/2! , 3/3! , 4/4! . . . .

Inicio

N

Inicio

N

I=0

F=1

I=n

no

Fin

si

Inicio

N

I=0

F=1

I=n

si   Fin

no

F=1

Fin

I=1 to N

I

F=F*I

I=I+1

F=F*I

I=I+1F=F*I

1/F

1/F

1/F

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 8/18

19.- Generar la serie:

½ , 2/3 , ¾ , 4/5 . . . .

Inicio

N

Inicio

N

I=0

I=n

no

Fin

si

Inicio

N

I=0

I=n

si   Fin

no

Fin

I=1 to N

I

I=I+1

I=I+1

I/(I+1)

I/(I+1)

I/(I+1) 

20.- Generar la serie:

½ ¼ 2/6 3/8 5/10 8/12 13/14 . . . .

Inicio

N

Inicio

N

I=0

 A=1B=1

Inicio

N

I=0

 A=1

B=1

 A=1B=1

Fin

I=1 to N

I

 A/(2*I)

C=A+B

 A=B

B=C

I=n

no

Fin

si

 A/(2*I)

I=I+1

C=A+B

 A=B

B=C

I=n

siFin

no

 A/(2*I)

I=I+1

C=A+B

 A=B

B=C 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 9/18

 

21.- Generar la serie:1+X =(X+1)2 = 1 +x – x2 +x3 - ......

2 8 16

Inicio

X,N

Inicio

N

Inicio

N

SIG=1

F=4

P=X

S=1K=2

Fin

I=1 to N

I

S=S+sig*P/K

P=P*X

SIG=SIG*(-1)

K=2*F

F=F+4

S

I=n

no

Fin

si

I=0

SIG=1

F=4

P=X

S=1

K=2

I=I+1

S=S+sig*P/K

P=P*X

SIG=SIG*(-1)

K=2*F

F=F+4

S

I=n

si

Fin

no

I=0

SIG=1

F=4

P=X

S=1K=2

I=I+1

S=S+sig*P/K

P=P*X

SIG=SIG*(-1)

K=2*F

F=F+4

S

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 10/18

 

22.- Generar la serie:

(e)x = 1 +x +x2 + x3 + . . . .

1! 2! 3!

Inicio

X,N

Inicio

X,N

Inicio

X,N

S=1

F=1

V=1

Fin

I=1 to N

I

V=V*X

F=F*I

S=S+V/F

S

I=n

no

Fin

si

S

I=n

si

Fin

no

S

I=0

S=1

F=1

V=1

I=I+1

V=V*X

F=F*I

S=S+V/F

I=0

S=1

F=1

V=1

I=I+1

V=V*X

F=F*I

S=S+V/F

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 11/18

23.- Generar la serie:

cos (x) =1 – x2 + x4 – x6 . . .

2! 4! 6!

Inicio

X,N

Inicio

X,N

Inicio

X,N

SIG=1

F=1

V=1

S=1

Fin

I=1 to N

I

V=V*X*X

F=F*J*(J+1)sig=sig*(-1)

J=2*I-1

S=S+SIG*V/F

S

I=n

no

Fin

si

S

I=n

si

Fin

no

S

I=0

SIG=1

F=1

V=1

S=1

I=I+1

V=V*X*X

F=F*J*(J+1)

sig=sig*(-1)J=2*I-1

S=S+SIG*V/F

I=0

SIG=1

F=1

V=1

S=1

I=I+1

V=V*X*X

F=F*J*(J+1)

sig=sig*(-1)

J=2*I-1

S=S+SIG*V/F

24.- Generar la serie:

(a)x = 1 + x ln a +(x ln a)2 + (x ln a)3 + . . . .1! 2! 3!

Inicio

 A,X,N

Inicio

 A,X,N

Inicio

N

Fin

I=1 to N

I

K=K*X*LN(A)

F=F*I

S=S+K/F

S

I=n

no

Fin

si

S

I=n

si

Fin

no

S

I=0

S=1

F=1

K=1

S=1

F=1

K=1

I=I+1K=K*X*LN(A)

F=F*I

S=S+K/F

I=0

S=1

F=1

K=1

I=I+1

K=K*X*LN(A)

F=F*I

S=S+K/F

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 12/18

25.- Generar la serie:

(coth)-1 x = 1 + 1 + 1 + . . . .

x (3x)3 (5x)5

Inicio

X,N

Inicio

X,N

Inicio

X,N

Fin

I=1 to N

I

J=2*I-1

S=S+I/(J*X^J)

S

I=n

no

Fin

si

S

I=n

si

Fin

no

S

S=1   I=0

S=1

I=0

S=1

I=I+1

J=2*I-1

S=S+I/(J*X^J)

I=I+1

J=2*I-1

S=S+I/(J*X^J)

26.- Generar la serie:

1  2 3 4 5

-1 -2 -3 -4

1 2 3

-1 -2

1

Inicio

N

Fin

J=1 to I

 j

I=N to 1

N+1-Imod 2<>0

i -i

i

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 13/18

Inicio

X,N

I=n

no

Fin

si

I=N+1

I=I-1

J=0

J=j+1

N+1-Imod 2<>0

-j j

sino

I=J

no

si

 

Inicio

N

I<>1

siFin

no

I=N+1

I=I+1

I=I+1

I<>1

I=I+1

N+1-Imod 2<>0

-j j

sino

si

no

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 14/18

27.- Generar la serie:

1 2 3 4 -5

1 2 3 -4

1  2 -3

1  -2

1Inicio

N

Fin

J=1 to I

 j

I=N to 1

I=J

 j   -j

sino

i

 

Inicio

N

I=1

no

Fin

si

I=N+1

I=I-1

J=0

J=j+1

i=j j

no

I=J

no

si

-jsi

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 15/18

Inicio

N

I<>1

siFin

no

I=N+1

I=I-1

 j=0

 j<>i

 j=j+1

I=J

 j -j

sino

si

no

 

28.- Generar la serie:

1 0 0 0 1

0 1 0 10 0 1

0  1

Inicio

N

Fin

J=1 to I

 j

I=N to 1

(I=J)ó(i+j=N+1)

0   1

sino

i

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 16/18

Inicio

N

I=1

no

Fin

si

I=N+1

I=I-1

J=0

J=j+1

(I=J)ó(I+J=N+1)

0

no

I=J

no

si

1

si

 

Inicio

N

I<>1

siFin

no

I=N+1

I=I-1

 j=0

 j<>i

 j=j+1

(I=J)ó(i+j=n+1)

0 1

sino

si

no

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 17/18

29.- Generar la serie:

1 1 2 2 3 3

1 2 2 3 3

2 2 3 3

2 3 3

3 33

Inicio

N

Z=0

Fin

I=N to 1

 j

i

(N+1-i)mod 2=0   sino

z=z+1

B=z

 A=1

B=z

 A=2

J=1 to I

 A<>3   sino

B=B+1

 A=2B=z

BB

 

7/18/2019 DIAGRAMA DE FLUJO.pdf

http://slidepdf.com/reader/full/diagrama-de-flujopdf-56d643fa04a08 18/18