/*DESARROLLAR UN PROGRAMA EN LENGUAJE C QUE CALCULE EL FACTORIAL DE UN NÚMERO. EL FACTORIAL DE UN NÚMERO ES EL PRODUCTO DE TODOS LOS ENTEROS EXISTENTE DESDE EL NÚMERO 1 HASTA EL NÚMERO DADO.*/
#include
#include
main()
{
int cont,a,factorial=1,i;
clrscr();
printf("Valor: ");
scanf("%d",&a);
for (i=1; i<=a; i++)
printf("%d ",i); /* Imprime del 1 hasta el valor de a */
for(cont=1;cont<=a;cont++)
factorial=factorial*cont;
printf("= %d",factorial);
getch();
}
One of the most astonishing old town on the planet Old City of Jerusalem
-
Jerusalem is perhaps the most established city on the planet . By measuring
its history and its multifaceted nature, on the off chance that we think
about ...
Hace 5 años
0 comentarios:
Publicar un comentario