fluxograma problema 1

1
Fluxograma algoritmo “Soma Impar” INICI O ************************************** N "O valor de X não pode ser maior ou igual a Y. Informe 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+a ux_X) “A soma dos impares é” , 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) V F

Upload: silartes

Post on 24-Dec-2015

1 views

Category:

Documents


0 download

DESCRIPTION

Fluxograma

TRANSCRIPT

Page 1: Fluxograma Problema 1

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