Post on 14-Oct-2015
FUNDAMENTOS DE PROGRAMACIONPara Programar no Solo se Necesita Manejar un Lenguaje de Programacin (JLPERALTA)
Ing. Jos Luis Peralta Lujn
FUNCIONES Y PROCEDIMIENTOS
Ing. Jos Luis Peralta Lujn
FUNCIONES
Ing. Jos Luis Peralta Lujn
FUNCIONES (EJEMPLOS)
Ing. Jos Luis Peralta Lujn
FUNCIONES (EJEMPLOS)
Ing. Jos Luis Peralta Lujn
FUNCIONES (EJEMPLOS)
Ing. Jos Luis Peralta Lujn
FUNCIONES (INVOCACIN - LLAMADO)
Ing. Jos Luis Peralta Lujn
PROCEDIMIENTOS
Ing. Jos Luis Peralta Lujn
PROCEDIMIENTOS
procedimiento escribirSaludos (E entero: cantidad)
var
entero : c
inicio
c 0
mientras (c < cantidad) hacer
escribir(Hola)
c c+1
fin_mientras
fin_procedimiento
Ing. Jos Luis Peralta Lujn
PROCEDIMIENTOSprocedimiento escribirSaludos (E entero: cantidad)
var
entero : c
inicio
c 0
mientras (c < cantidad) hacer
escribir(Hola)
c c+1
fin_mientras
fin_procedimiento
algoritmo saludar
var
entero : n
Inicio
escribir (Ingrese la cantidad : )
leer (n)
llamar_ a escribirSaludos(n)
fin
Ing. Jos Luis Peralta Lujn
FUNCIONES Y PROCEDIMIENTOS (IMPLEMENTACION)
Ing. Jos Luis Peralta Lujn
FUNCIONES
entero funcion sumar (E entero : n1 ; E entero : n2)
var
entero : r
inicio
r n1 + n2
devolver (r)
fin_funcion
algoritmo sumarNumeros
var
entero : nu1
entero : nu2
entero: res
inicio
leer (nu1)
leer (nu2)
res sumarNumeros(nu1, nu2)
escribir (res)
fin
Ing. Jos Luis Peralta Lujn
PROCEDIMIENTOS
Ing. Jos Luis Peralta Lujn
FUNCIONES Y PROCEDIMIENTOS (IMPLEMENTACION)
Ing. Jos Luis Peralta Lujn
DECLARACION
Ing. Jos Luis Peralta Lujn
Ing. Jos Luis Peralta Lujn
LIBRERIAS
principal.cpp
Ing. Jos Luis Peralta Lujn
LIBRERIAS
principal.cpp jlperalta.h
Ing. Jos Luis Peralta Lujn