Skip to content

Instantly share code, notes, and snippets.

@Ilyes-Hammadi-Ahmed
Created March 4, 2015 22:16
Show Gist options
  • Select an option

  • Save Ilyes-Hammadi-Ahmed/6c55c7854accd9db1f8f to your computer and use it in GitHub Desktop.

Select an option

Save Ilyes-Hammadi-Ahmed/6c55c7854accd9db1f8f to your computer and use it in GitHub Desktop.
attention au remarques
package com.company;
public class Main {
public static void main(String[] args) {
// write your code here
}
public static int factoreil(int n){
int fct = 1;
for (int i = 2 ; i <= n ; i++) {
fct *= i;
}
return fct;
}
}
/* remarque
1. quand tu entre dans nouveau bloc que sa soit if ou for ou n'importe quelle bloc d'instrcution
fait une tabulation
2. ajoute des space entre les operande ex: mauvais f*=i bonne f *= i
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment