using System; namespace RechercheTab { class MainClass { public static void Main (string[] args) { int n = 10; int [] t = new int[n]; for (int i = 0 ; i < n ; i++) t[i] = i + 1; Console.Write("Saisissez un entier : "); int v = int.Parse(Console.ReadLine()); int k = 0; while(k < n && t[k] != v) k++; if (k == n) Console.WriteLine(v + " ne se trouve dans le tableau."); else Console.WriteLine(v + " se trouve dans le tableau à l'indice " + k + "."); } } }