Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 import java.util.Scanner; public class ExamenMinMaxMoyenneee { public static Scanner scanner = new Scanner(System.in); public static void main(String[] args) { int max = 0, min = 0; for (int i=1; i<=5; i++){ System.out.println("la cote numero" + i); int cote = scanner.nextInt(); if (cote<max){ max = cote; }else{ if (cote>min){ } } } System.out.println("la cote plus eleve est "+ max + ", " +"la cote la plus basses est "+ min); } }
bonjour j'essaye d'afficher lentier min et lentier max que j'ai taper au clavier pour l'instant ca maffiche 0 qulqu'uun peut t il m'aider ?
je suis un debutant.