Sei sulla pagina 1di 17

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS1 PROBLEMAS SECUENCIALES

1. Elaborar un programa en el cual se ingrese la distancia que existe en dos vehculos y sus respectivas velocidades. Hallar el tiempo de alcance y el tiempo de encuentro? ANLISIS:
Especificacin Entrada Dato Variable Velocidad 1 x vehiculo Velocidad 2 y vehiculo Distancia d

VISUALIZACIN:
TIEMPO DE ALCANCE Y TIEMPO DE Tipo real real real Ingrese la distancia:
Calcular
(d)

ENCUENTRO Ingrese velocidad 1: Ingrese velocidad 2:


(x)

(y)

El tiempo de encuentro es: (te) El tiempo de alcance es:


(ta)

El Producto es:

La Suma es: Especificacin Salidas Dato Variable Tiempo de ta alcance Tiempo de te encuentro Tipo real real

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS2 PSEUDOCDIGO: FLUJO: DIAGRAMAS DE

Algoritmo_Tiempo de alcance y de encuentro x, y, d, te, ta: real Inicio Leer (x, y, d) te = d/(x + y) ta = d/(x - y) Escribir (te, ta) Fin

Inici o Leer (x, y, d) te = d/(x+y)

ta = d/(x-y)

Escribir (te, ta) Fin

2. Elaborar un programa el cual se ingrese la distancia y el tiempo de un vehculo. Hallar la aceleracin?

ANLISIS: VISUALIZACIN:
Especificacin Entrada Dato Variable distancia d tiempo t ACELERACIN Ingrese tiempo: Ingrese la distancia:
(t)

Tipo real real

(d)

Calcular

La aceleracin es:

(a)

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS3

Variables Internas Dato Variable velocidad v

Tipo real

Especificacin Salidas Dato Variable Aceleracin a

Tipo real

PSEUDOCDIGO: DE FLUJO:

DIAGRAMAS

Algoritmo_Aceleracin t, d, a, v: real Inicio Leer (t, d) v = d/t a = v/t Escribir (a) Fin

Inici o Leer (t, d)

v = d/t

a = d/t

Escribir (a)

Fin

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS4

3. Elabore un programa en la que me devuelva la altura y velocidad final de un cuerpo que se deja caer ingresando nicamente el tiempo.

ANLISIS: VISUALIZACIN:
Especificacin Entrada Dato Variable tiempo t CADA LIBRE Ingrese tiempo:
(t)

Tipo real

Calcular

La velocidad Final es: La altura es:

(vf)

(h)

Especificacin Salidas Dato Variable Altura h Velocidad Final vf

Tipo real real

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS5 PSEUDOCDIGO: DE FLUJO: DIAGRAMAS

Algoritmo_Caida libre t, h, vf: real Inicio Leer (t) vf = 10 * t h = (vf/2) *t Escribir (vf, h) Fin

Inici o Leer (t)

vf = 10 * t

h = (vf/2) *t

Escribir (vf, h)

Fin

4. Convierta el ngulo sexagesimal g m s a grados, minutos y segundos centesimales.

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS6 ANLISIS:


Especificacin Entrada Dato Variable Grados gs sexagesimales Minutos ms sexagesimales Segundos ss sexagesimales

VISUALIZACIN:
Tipo Entero Entero Entero

CONVERSIN SEXAGESIMALES A CENTESIMALES Ingrese los grados (gs)


sexagesimales:
(ms)

Ingrese los minutos sexagesimales: Ingrese los segundos centesimales:


Calcular
(gra) (ss)

Los grados centesimales son:

Los minutos centesimales son:

(min) (seg)

Los segundos centesimales son: Variables Internas Dato Variable Tipo Valor en S real grados sexagesimales Valor en C real grados centesimales

DIAGRAMA
Especificacin Salidas Dato Variable Grados gra centesimales Minutos min centesimales Segundos seg sentesimales

S DE FLUJO:
Tipo entero entero entero

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS7 Inicio

Leer (gs, ms, ss)

S= gs +ms/60+ ss/3600 C = 10 * s/9 PSEUDOCDIGO: gra = entero(c)sexagesimales Algoritmo_Conversin a centesimales min = entero ((C entero gs, ms, ss, gra, min, seg: gra)*100) S, C: real seg = (((C - gra)*100)Inicio min)*100 Leer (gs, ms,ss) Escribir (gra, min, seg) S= gs +ms/60+ ss/3600 C = 10 * s/9 gra = entero(c) Fin min = entero ((C - gra)*100) seg = (((C - gra)*100)- min)*100 Escribir (gra, min, seg) Fin

5. Elaborar un programa en el que se ingrese la masa atmica y la cantidad de neutrones para que nos devuelva el nmero atmico, la cantidad de electrones y protones.

ANLISIS: VISUALIZACIN:

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS8


Especificacin Entrada Dato Variable Masa A atmica neutrones N Tipo entero entero ZAPEN Ingrese la masa atmica:
(A)

Ingrese el nmero de neutrones: (N)


Calcular

El nmero de protones es: El nmero de electrones es: El nmero atmico es:

(P) (e) (Z)

Especificacin Salidas Dato Variable Protones P electrones e Numero atmico A

Tipo entero entero entero

PSEUDOCDIGO: DE FLUJO: Algoritmo_Zapen Z, P, e, A, N: entero Inicio Leer (A, N) P = A-N Z=P e=P Escribir (P, e, Z) Fin

Inici o

DIAGRAMAS

Leer (A, N)

P = A-N

Z=P e=P

Escribir (P, e, Z) Fin

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS9

6. Elaborar un programa en el que ingrese el tiempo en el que se demora en llegar el sonido de una detonacin a cierto lugar. Calcular la distancia donde se realiz la detonacin?

ANLISIS: VISUALIZACIN:
Especificacin Entrada Dato Variable tiempo t DISTANCIA Ingrese tiempo:

Tipo real

(t)

La distancia es:
Calcular

Especificacin Salidas Dato Variable distancia d

Tipo real

(d)

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS10

PSEUDOCDIGO: DE FLUJO:

DIAGRAMAS

Algoritmo_distancia t, d: real Inicio Leer (t) d = 340 *t Escribir (d) Fin

Inici o Leer (t)

d = 340 *t

Escribir (d)

Fin

7. Ingresando el radio de una esfera y la altura de un casquete determinar el rea y volumen de dicho casquete esfrico.

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS11

ANLISIS: VISUALIZACIN:
Especificacin Entrada Dato Variable radio r altura h

REA Y VOLUMEN DE UN CASQUETE ESFRICO Tipo real real Ingrese el radio: Ingrese la altura:
(r)

(h)

Calcular

El volumen es: El rea es:

(v) (A)

Especificacin Salidas Dato Variable rea A Volumen V

Tipo real real

Inicio

PSEUDOCDIGO: Algoritmo_Area y volumen de un DE FLUJO: casquete esfrico r, h, A, V: real Inicio Leer (r, h) A = 2**r*h V = (*(h^2)*((3*r)-h))/3 Escribir (A, V) Fin

Leer (r, h)

DIAGRAMAS

A = 2**r*h

V = (*(h^2)*((3*r)h))/3 Escribir (A, V)

Fin

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS12

8. Elaborar un programa en el que se ingrese una cantidad en kilmetros y nos devuelva en millas nuticas, millas terrestres, yardas, pies y brazas nuticas (1mt = 1.609 Km; 1mn = 1.852 Km; 1bn = 1.829 m; 1yarda = 0.9144 m = 3 pies).

ANLISIS: VISUALIZACIN:
Especificacin Entrada Dato Variable Cantidad en km kilmetros

CONVERSIN DE LONGITUDES Ingrese la cantidad en kilmetros::


Calcular
(mn) (km)

Tipo real

La cantidad en millas nuticas es:


(mt)

La cantidad en millas terrestres es: La cantidad en yardas es: La cantidad en pies es:
(yardas)

(pies)

(bn)

La cantidad en brazas nuticas es:

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS13


Ingrese la distancia: Especificacin Salidas Dato Variable Cantidad en mn millas nuticas Cantidad en mt millas terrestres Cantidad en yardas yardas Cantidad en pies pies Cantidad en bn Brazas nuticas Tipo real La aceleracin es:

real

real real real

Inicio

Leer (Km)

mt = km/1.609 mn = km/1.852 bn = (km*1000)/1.829 yardas = (km * 1000)/0.9144 DIAGRAMAS DE FLUJO: pies = yardas *3

Algoritmo_Conversin de PSEUDOCDIGO: longitudes Km, mn, mt, yardas, pies, bn: real Inicio Leer (Km) mt = km/1.609 mn = km/1.852 bn = (km*1000)/1.829 yardas = (km * 1000)/0.9144 pies = yardas *3 Escribir (mn, mt, yardas, pies, bn)

Escribir (mn, mt, yardas, pies, bn) Fin

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS14

9. Elaborar un programa en el que se ingrese una cantidad en gramos y convertirlas en onzas, libras, dinas y newton (1 onza = 28,349 gr; 1N = 105 dinas = 0.2248 libras; 1 libra = 453.592 gr). ANLISIS: VISUALIZACIN:
Especificacin Entrada Dato Variable gramos gr CONVERSIONES DE MASA Ingrese la cantidad en gramos:

Tipo real

(gr)

La cantidad en onzas es: La cantidad en libras es:

Especificacin Salidas Dato Variable onza onza Libras libras Dinas dinas newton N
(onza)

Calcular

Tipo real Real Real real

La cantidad en dinas es: La cantidad en Newton es:

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS15


(libras ) (dinas) (N)

PSEUDOCDIGO: DE FLUJO:

DIAGRAMAS

Algoritmo_Conversiones de masa gr, onza, libras, dinas, N: real Inicio Leer (gr) onza = gr/28.349 libras = gr/453.592 dinas = (libra*105)/0.2248 N = dinas/105 Escribir (onza, libra, dinas, N) Fin

Inici o Leer (gr)

onza = gr/28.349

libras = gr/453.592 dinas = (libra*105)/0.2248 N = dinas/105

Escribir (onza, libra, dinas, N) Fin

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS16


Variables Internas Dato Variable Valor a v Valor b b Valor y y Valor z z

Tipo real real real real

10.De la siguiente expresin hacer un programa: a = m *n b = (c + (m - x))*3 y = (a * c)+n Z =(a *b) - y K = 2 *(x + y + z)+((m + n)*(a + b + c)) ANLISIS: VISUALIZACIN:
Especificacin Entrada Dato Variable Valor m m Valor n Valor x Valor c n x c

Tipo real real Real real

CONVERSIN SEXAGESIMALES A CENTESIMALES Ingrese valor m: (m)


Ingrese valor n: Ingrese valor x: Ingresar valor c:
(n)

(x) (c)

Calcular

El valor K es:

(K)

Especificacin Salidas Dato Variable Valor K K

Tipo real

FACULTAD DE INGENIERA ESCUELA DE SISTEMAS17

PSEUDOCDIGO: DE FLUJO: Inicio Algoritmo_Expresiones m, n, x, c, k, a, b, y, z: real Inicio Leer (m, n, x, c) a = m *n

DIAGRAMAS

Leer (m, n, x, c)

a = m *n b = (c + (m - x))*3 y = (a * c)+n Z =(a *b) - y

b = (c + (m - x))*3

y = (a * c)+n K = 2 *(x + y + z)+((m +n)*(a +b + c)) Z =(a *b) - y K = 2 *(x + y + z)+((m + n)*(a + b + c)) Escribir (k) Fin Fin Escribir (k)

Potrebbero piacerti anche