using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Exemple8._7 { class Program {/*Énoncé: Écrire une fonction qui calcul le max de deux nombres passés en paramètre*/ static public int LireNombre(char indice) { int nombre; Console.Write("Donnez-moi le nombre {0}: ", indice); nombre = int.Parse(Console.ReadLine()); return nombre; } static public void Afficher(string s, int param) { Console.WriteLine("{0} {1}", s, param); } static public int maximum(int x, int y) { int max=x; if (y> x) max= y; } static public void stop() { Console.Read(); } static void Main(string[] args) { int nombre1, nombre2, max; nombre1 = LireNombre('X'); nombre2 = LireNombre('Y'); max = maximum(nombre1, nombre2); Afficher("le max entre "+nombre1+" et "+nombre2+" :", max); stop(); } } }