Trabajos

Páginas: 2 (276 palabras) Publicado: 11 de noviembre de 2012
1. QUE INDIQUE SI UN NÚMERO ES POSITIVO O NEGATIVO Y SI ES PAR E IMPAR

Escribir "Dime un numero";
Leer x;
Si x > 0 Entonces
Escribir "Es positivo";
Sino
Si x < 0 EntoncesEscribir "Es negativo";
FinSi
FinSi
Fin

ESCRIBIR "Introduce un n£mero: " 
LEER num 
SI num = int( num / 2 ) * 2 ENTONCES 
ESCRIBIR "es par" 
SINO 
ESCRIBIR "es impar" 
FINSI FINPROGRAMA 

2. RECONOCER SI UN NÚMERO ES PRIMO O NO.


Inicio
   escribe "Introduce numero:"
   lee n
   cont = 0
   para i = 1 hasta n hacer
      si nmod i = 0
         cont =cont + 1
      fin_si
   fin_para
   si cont = 2 hacer
      escribe "El numero es primo"
   si_no
      escribe "El numero noes primo"
   fin_si
Fin




3. OBTENER EL FACTORIAL DE UN NÚMERO

inicio

factorial = 1

si numero >= 1 entonces

haga desde i=1 hasta numerofactorial = factorial*i

fin_desde

sino

si numero = 0

factorial = 1

sino

imprimir("No se puede calcularfactorial; número negativo")

fin_si

fin_si

fin

4. PASAR UN NÚMERO DE DECIMAL A BINARIO Y DE BINARIO A DECIMAL.




INICIO
Solicitar al usuario numeroDecimal.
SI el numero es 0 ó 1 ENTONCES.
IMPRIMIR el numero Binario es igual el numero decimal.
SI NO es 0 ó 1 ENTONCES.
MIENTRAS cociente sea MAYOR a 1.
DIVIDIR elnumero decimal entre 2.
IMPRIMIR residuo.
Terminar MIENTRAS. 
SI el cociente es igual a 1.
Imprimir 1.
Terminar SI
FIN




5. A PARTIR DE UN NUMERO ENTERO NMAYOR QUE CERO OBTENER N CANTIDAD DE
LOS TÉRMINOS DE FIBONACCI










6. OBTENER EL PROMEDIO DE N NÚMEROS MEDIANTE UN CICLO

Empieza
     escribe "Cuantos numeros...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Trabajadores Del Trabajo
  • trabajo del trabajo
  • Trabajo Del Trabajo
  • El trabajo y el Trabajador
  • Trabajo Trabajador
  • trabajo trabajo
  • trabajo trabajo
  • Trabajo de trabajo

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS