This document was uploaded by user and they confirmed that they have the permission to share
it. If you are author or own the copyright of this book, please report to us by using this DMCA
report form. Report DMCA
Overview
Download & View Factorial De Un Numero En C as PDF for free.
#include <stdio.h> #include int main() { int num; int i = 1; int factor = 1; printf("Introduce un numero para ver su factorial\n"); scanf("%d", &num); if (num < 0) { printf("No has introducido un numero valido\n"); getch(); } else { while (num > 0) { factor = num * factor; num--; } } printf("El factorial es %d\n", factor); getch(); }