Skip to content
Snippets Groups Projects
Select Git revision
  • eb339d0ff4449bb2148d15f1ba6a784e36988a5f
  • main default protected
2 results

create-S3-and-put-docs.py

Blame
  • 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);
    }