1
0
Fork 0
mirror of https://codeberg.org/DansLeRuSH/c-plus-plus-exercises.git synced 2024-05-18 08:14:57 +00:00
c-plus-plus-exercises/EX04_plus_petit_plus_grand_nombre.cpp

24 lines
518 B
C++

// Auteur : Franck ALBARET
#include <stdio.h>
int main (void)
{
int Nbr;
int Nbr2;
puts ("Quel est le premier nombre ?");
scanf ("%i",&Nbr);
puts ("Quel est le deuxième nombre ?");
scanf ("%i",&Nbr2);
{
if (Nbr>Nbr2)
{
printf ("Le plus grand nombre est %i\n",Nbr);
printf ("Le plus petit nombre est %i\n",Nbr2);
return 0;
}
printf ("Le plus grand nombre est %i\n",Nbr2);
printf ("Le plus petit nombre est %i\n",Nbr2);
return 0;
}
}