Sie sind auf Seite 1von 1

#include <stdio.

h>
main(){
int i,k,fac;
fac=1;
printf("visualizar los factoriales desde el 0 hasta el 6\n\n");

for(i=0;i<7;i++){
for(k=i;k<i+1;k++){
fac=fac*k;
if(k==0){
fac=1;
}
}
printf("%d \t %d\n",i,fac);
}
system("pause");
}

Das könnte Ihnen auch gefallen