Select Git revision
create-S3-and-put-docs.py
Forked from
LSDS / Teaching / Master / Cloud / chatbot-lab
Source project has a limited visibility.
factorielle.c 401 B
#include <stdio.h>
// Programme calculant la factorielle d'un nombre
void main() {
int nb = 1;
printf("Entrer un nombre: ");
scanf("%d",&nb);
int fact = 1;
for(int i=2;i<=nb;i++) {
fact *= i;
}
/*int iter = 2;
while(iter <= nb) {
fact *= iter;
iter++;
}
do {
fact *= iter;
iter++;
} while(iter <= nb);*/
printf("Fact = %d\n",fact);
}