// Afficher tous les carrés entre deux valeurs lues en entrée using System; public class Carres { public static void Main() { try { string v1 = Console.ReadLine(); int x = int.Parse(v1); string v2 = Console.ReadLine(); int y = int.Parse(v2); if(x > y) { int z = x; x = y; y = z; } for(int n = x; n <= y; n++) { Console.Out.WriteLine(n * n); } } catch (Exception e) { Console.Out.WriteLine("Entrée invalide !"); } } // main() } // class Carres