Entradas

Mostrando entradas de septiembre, 2023

Factorial de un Numero en PSeInt

Imagen
EL FACTORIAL El factorial de un numero entero positivo se define como el producto de todos los numero naturales anteriores o iguales a èl. Algoritmo en PSeInt. Elaborar algoritmo que permite calcular el factorial de un numero cualquiera ingresado por teclado. Estructura repetitiva - PARA: Algoritmo Factorial Definir N, NF, C, FACT Como Entero Escribir "Digite un Numero:" Leer N NF=1 Para C<-1 Hasta N Con Paso 1 Hacer FACT=NF*C Escribir NF,"*", C,"=", FACT NF=FACT Fin Para Escribir "El factorial de ", N, " es igual a: ", FACT FinAlgoritmo Estructura repetitiva -MIENTRAS: Algoritmo Factorial Definir N, NF, C, FACT Como Entero Escribir "Digite un Numero:" Leer N NF=1 C=1 Mientras C<=N Hacer FACT=NF*C Escribir NF,"*", C,"=", FACT NF=FACT C=C+1 Fin Mientras Escribir "El factorial de ", N, " es igual a: ", FACT FinAlgoritmo Estruct...