fluxograma problema 1

Post on 24-Dec-2015

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Fluxograma

TRANSCRIPT

Fluxograma algoritmo “Soma Impar”

INICIO

INICIO

********************************************

“Projeto soma impar entre dois números inteiros Xe ”********************************************

N

"O valor de X não pode ser maior ou igual a Y. Informe novos valores para X e Y."

CONT<= N

F

“Informe o",CONT, "º Valor de X”

“Informe o",CONT, "º Valor de Y”

Fim

F

V

(aux_X % 2 <> 0)

(aux_X < Y )

aux_X := aux_X + 1

V F

aux_X := X

(Aux_X>=Y)

CONT:=CONT-1

F

V

aux_X := aux_X + 1

(aux_X % 2 <> 0)

Soma_impar:=( Soma_impar+aux_X)

“A soma dos impares é” , SOMA_IMPAR

Soma_impar:=0, Cont:=cont+1

V

F

X, N, Y, SOMA_IMPAR, CONT, aux_X :INTEIRO

V

X=0,N=0,Y=0,CONT=1,SOMA_IMPAR=0,AUX_X=0

(X<Y)

VF

top related