using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Exemple7._6 { class Program { static void Main(string[] args) {/*Énoncé: Écrire un programme qui lit un texte et * calcul le nombre de voyelles dans ce texte. Vous devez utiliser un tableau pour stocker les voyelles */ char[] voyelles = { 'a', 'e', 'u', 'i', 'y', 'o' }; string texte; int cptVoy = 0, cptTour=0; Console.Write("Donnez-moi votre texte: "); texte = Console.ReadLine(); //version avec tableau voyelles non optimal //for (int i = 0; i < texte.Length; i++) //{ // for (int j = 0; j < voyelles.Length; j++) // { // cptTour++; // if (texte[i] == voyelles[j]) cptVoy++; // } //} // vesrsion avec des ifs //for (int i = 0; i < texte.Length; i++) //{ // cptTour++; // if ((texte[i] == voyelles[0]) || (texte[i] == voyelles[1]) // || (texte[i] == voyelles[2]) || (texte[i] == voyelles[3]) // || (texte[i] == voyelles[4]) || (texte[i] == voyelles[5])) // { // cptVoy++; // } //} //version optimal avec while for (int i = 0; i < texte.Length; i++) { int j=0; Boolean ntrouve = true; while ((j