23 lines
455 B
C
23 lines
455 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#define NBINT 5
|
||
|
|
||
|
void reverse(int state) {
|
||
|
int entier;
|
||
|
printf("Entier n° %d : ", NBINT - state + 1);
|
||
|
scanf("%d", &entier);
|
||
|
|
||
|
if (state != 1) /*On demande les autres entiers avant de print !*/
|
||
|
reverse(state-1);
|
||
|
|
||
|
printf("%d ", entier);
|
||
|
|
||
|
if (state == NBINT)
|
||
|
putchar('\n'); /*On retourne à la ligne à la fin.*/
|
||
|
}
|
||
|
|
||
|
int main(void) {
|
||
|
reverse(NBINT);
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|