Si deseas hacer un intercambio de links con DotNetcr, escríbenos aquí
Recibe las actualizaciones vía RSS
Te invitamos a unirte en nuestras redes

Hallar el factorial de un número

Por cmas607 | 8/18/2005 | Visitas 19,950 | Voto 0.00
Este ejemplo en C# nos demuestra como calcular el factorial de un número.
Categorías : C#
En nuestras aplicaciones necesitamos muchas veces hacer cálculos numéricos y para esto podríamos tener clases completas con estas funciones que nos puedan servir en cualquier sitio de nuestros programas.

Descargar archivo

Este ejemplo fue agregado a vía PanoramaBox, así que no te olvides de votar y dar tu opinión, para así colaborar con el usuario que nos ha brindado el código.

Artículos relacionados:
- Función en SQL para calcular el factorial. Utilizando recursividad.
- Método para hallar funciones matemáticas por método de Lagrange
Area de Comentarios
Por Anónimo - Fecha: 2006/09/29 11:10 PM
He comprobado este algoritmo y esta mal , por que hallar el factorial de un numero es realizar la multiplicacion de sus enteros anteriores al numero factorial ingresado y el sistema no hace eso .
Comprueben ingresando el numero 3 su factorial deberia de ser 1*2*3=6 pero en este alggoritmo sale 27.
Ana Carrasco Silvera
Por Anónimo - Fecha: 2006/10/29 03:34 PM
me parece bueno que haya gente que apoye la programacion... no me salía el programa hasta que encontré esta página ... soy nuevo en esto de la programación... quiero agradecer de antemano a la persona que colocó este programa estoy seguro que aprenderé mucho de el gracias ... Pablo Salas Alvarez
Por Anónimo - Fecha: 2006/10/29 03:38 PM
Yo probe el programa en mi máquina con el factorial de 3 y el resultado es 6 creo que te puedes referir al algoritmo.. Ana Carrasco Silvera.. bueno de todas maneras revisalo bien porque el factorial de 3 si sale 6 ... :)
Pablo Salas Alvarez
Por Anónimo - Fecha: 2007/06/19 10:59 PM
yo tambien probe el factorial y pincha tocao.....ademas de que habia trabajado con el en otras ocasiones.....
ana, revisa con cuidado lo que hiciste....
jose (estudiante de 5to año de ingenieria en informatica en la Universidad Hnos Saiz)
Por Anónimo - Fecha: 2007/08/28 08:38 PM
necesito saber sobre el algoritmo factorial
Por Anónimo - Fecha: 2008/01/07 04:45 PM
hagan la formula para factorial pero en visual 2005 please!!!
Por Anónimo - Fecha: 2008/04/28 04:45 PM
muy buen sitio web muchas gracias a los creadores de este sitio..
Por Anónimo - Fecha: 2008/05/07 07:40 PM
hola esta chido
Por Anónimo - Fecha: 2008/08/18 01:33 PM
eeaaa ps nescsitooo el codigoooo ayudaaaa!!!
ps pasenloo
Por Anónimo - Fecha: 2008/08/31 12:40 PM
muy buenoo..
tu algoritmo me sirvio de mucho!
aqui les dejo el algoritmo de la factorial en 4 lineas y si funciona:
int fact(int n)
if (n>0)
return n*fact(n-1)
return 1
ojala les sirva! utiliza recursividad
Por Anónimo - Fecha: 2008/09/05 11:24 AM
Por Anónimo - Fecha: 2008/09/22 01:54 PM
hola soy carlos yactayo y solo quiero agradecer al q hizo esta pagina ya q despues de masturbarme me gusta estudiar y en mi momento de ocio o weno de final de mi extasis encontre esto y con mi mano melosa me dedique a leer por completo
me gusta fernando alema
Por Anónimo - Fecha: 2008/11/07 09:31 PM
chimba me ayudo mucho gracias por la colovoracion
att: carlos
Por Anónimo - Fecha: 2012/09/17 12:36 AM
ana carrasco q ases por aca
Por Anónimo - Fecha: 2012/09/17 12:36 AM
ana carrasco q ases por aca
Por Anónimo - Fecha: 2012/09/17 12:37 AM
ana carrasco.. tremendas caderas...chata fuertoota.
Por Anónimo - Fecha: 2016/02/02 04:25 PM
Reading posts like this make surfing such a plruasee
Por Anónimo - Fecha: 2016/02/10 09:34 AM
Please let me know if you're looking for a acitrle author for your site. You have some really good posts and I feel I would be a good asset. If you ever want to take some of the load off, I'd absolutely love to write some material for your blog in exchange for a link back to mine. Please blast me an email if interested. Cheers!|Have you ever considered about including a little bit more than just your acitrles? I mean, what you say is important and all. However just imagine if you added some great visuals or video clips to give your posts more, pop ! Your content is excellent but with images and clips, this site could certainly be one of the most beneficial in its niche. Excellent blog!|Awesome blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple adjustements would really make my blog jump out. Please let me know where you got your design. Thanks|Hello would you mind stating which blog platform you're using? I'm going to start my own blog in the near future but I'm having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I'm looking for something unique. P.S Apologies for being off-topic but I had to ask!|Hello just wanted to give you a quick heads up. The words in your acitrle seem to be running off the screen in Ie. I'm not sure if this is a formatting issue or something to do with internet browser compatibility but I figured I'd post to let you know. The design look great though! Hope you get the problem resolved soon. Cheers|With havin so much content do you ever run into any problems of plagorism or copyright violation? My website has a lot of completely unique content I've either created myself or outsourced but it looks like a lot of it is popping it up all over the web without my authorization. Do you know any techniques to help protect against content from being ripped off? I'd truly appreciate it.|Have you ever considered creating an ebook or guest authoring on other websites? I have a blog based on the same topics you discuss and would love to have you share some stories/information. I know my audience would value your work. If you're even remotely interested, feel free to send me an e mail.|Hey there! Someone in my Facebook group shared this website with us so I came to give it a look. I'm definitely loving the information. I'm book-marking and will be tweeting this to my followers! Fantastic blog and wonderful design.|Very good blog! Do you have any recommendations for aspiring writers? I'm planning to start my own site soon but I'm a little lost on everything. Would you suggest starting with a free platform like WordPress or go for a paid option? There are so many choices out there that I'm totally confused .. Any suggestions? Thanks a lot!|My developer is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the costs. But he's tryiong none the less. I've been using Movable-type on a variety of websites for about a year and am nervous about switching to another platform. I have heard good things about Is there a way I can transfer all my wordpress posts into it? Any help would be greatly appreciated!|Does your blog have a contact page? I'm having problems locating it but, I'd like to shoot you an email. I've got some suggestions for your blog you might be interested in hearing. Either way, great website and I look forward to seeing it grow over time.|It's a shame you don't have a donate button! I'd without a doubt donate to this brilliant blog! I guess for now i'll settle for bookmarking and adding your RSS feed to my Google account. I look forward to brand new updates and will talk about this website with my Facebook group. Chat soon!|Greetings from Ohio! I'm bored to tears at work so I decided to browse your site on my iphone during lunch break. I really like the knowledge you provide here and can't wait to take a look when I get home. I'm shocked at how quick your blog loaded on my cell phone .. I'm not even using WIFI, just 3G .. Anyways, good blog!|Hey! I know this is kinda off topic but I'd figured I'd ask. Would you be interested in exchanging links or maybe guest authoring a blog acitrle or vice-versa? My site covers a lot of the same subjects as yours and I believe we could greatly benefit from each other. If you're interested feel free to shoot me an e-mail. I look forward to hearing from you! Terrific blog by the way! [url=]bgtwgk[/url] [link=]mdlxaxbji[/link]
Ingrese su Comentario
Para poder votar debe estar registrado en
Solo queda registrado el primer voto enviado

Últimos Recursos
ricardo leppe t
PER 238
MEX 236
CRI 190
COL 118
ESP 105
ARG 88