if (A>B) printf ("premier choix \n"); else
if (A>10) printf ("deuxième choix \n");
if (B<10) printf ("troisième choix \n");
else printf ("quatrième choix \n");a) Copiez la séquence d’instructions en utilisant des tabulateurs pour marquer les blocs if – else appartenant ensemble.
if (A>B)
printf ("premier choix \n");
else
if (A>10)
printf ("deuxième choix \n");
if (B<10)
printf ("troisième choix \n");
else
printf ("quatrième choix \n");b) Déterminez les réponses du programme pour chacun des couples de nombres suivants et vérifiez à l’aide de l’ordinateur.
| A=10 et B=5 : | premier choix |
| troisième choix | |
| A=5 et B=5 : | troisième choix |
| A=5 et B=10 : | quatrième choix |
| A=10 et B=10 : | quatrième choix |
| A=20 et B=10 : | premier choix |
| quatrième choix | |
| A=20 et B=20 : | deuxième choix |
| quatrième choix |