Bonjour ,

j'ai ce petit programme et je cherche a faire sotir le minimum de lambdabeta[i], c'est un tableau et je cherche son minimum,
si vous avez une idée je serai reconnaissante,


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
 ifstream f(Form("../2-chi2/val.txt"));
 int min = -1, secondMin = -1;
  for(int i=0; i<N; i++){
    f>>k[i]>>I[i]>>J[i]>>lamdaalpha[i]>>lamdabeta[i]>>khi2[i];
 
                int firstValue = lamdabeta[0];
		int secondValue = lamdabeta[1];
		if (firstValue < secondValue) {
			min = firstValue;
			secondMin = secondValue;
		} else {
			min = secondValue;
			secondMin = firstValue;
		}
 }
merci d'avance