weles
essaie avec ça . c'est exactement ce que tu veux avoir.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int nombre;
		System.out.println("Veuillez saisir un nombre...");
		nombre = sc.nextInt();
		System.out.println("le factorielle...");
		factorielle(nombre);
 
 
	}
public static void factorielle(final int nombre) {
		if(nombre != 0) {
			System.out.print(nombre+"!"+"="+nombre);
			for(int i = nombre-1 ; i >= 1 ; i --) {
				System.out.print("*"+i);
			}
 
		}
	}