Help moi en C#
Fermé
Herdj
-
15 déc. 2009 à 15:14
scriptiz Messages postés 1420 Date d'inscription dimanche 21 décembre 2008 Statut Membre Dernière intervention 14 mai 2013 - 15 déc. 2009 à 18:49
scriptiz Messages postés 1420 Date d'inscription dimanche 21 décembre 2008 Statut Membre Dernière intervention 14 mai 2013 - 15 déc. 2009 à 18:49
1 réponse
scriptiz
Messages postés
1420
Date d'inscription
dimanche 21 décembre 2008
Statut
Membre
Dernière intervention
14 mai 2013
422
15 déc. 2009 à 18:49
15 déc. 2009 à 18:49
Source :
using System;
namespace Multiplications
{
class Program
{
static void Main(string[] args)
{
Console.Write("Entrez un nombre : ");
int n = 0;
try
{
n = Int32.Parse(Console.ReadLine());
}
catch (FormatException e)
{
Console.WriteLine("Vous devez entrer un nombre entier !");
Console.ReadKey();
Environment.Exit(0);
}
for (int i = 1; i <= 10; i++)
{
Console.WriteLine(i + " x " + n + " = " + (i * n));
}
Console.ReadKey();
}
}
}