1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| #include <iostream>
using namespace std;
int main()
{
int Nombre1, Nombre2; // On declare les variables Resultat, Nombre1 et Nombre2
printf("Entrez le nombre 1 : "); // Demande d'entrer le nombre 1
scanf("%d", &Nombre1);
printf("Entrez le nombre 2 : "); // Demande d'entrer le nombre 2
scanf("%d", &Nombre2);
if ( Nombre1 > Nombre2)
printf ("Le plus grand est : Nombre 1");
else if (Nombre1 < Nombre2);
printf ("Le plus grand est : Nombre 2");
else (Nombre1 == Nombre2)
printf ("Les Nombre1 et Nombre2 sont égaux");
return 0; |
Partager