APL/APL1.1/Dev1.1/Debogueur/envers.c

21 lines
406 B
C
Raw Normal View History

2021-11-16 15:32:33 +01:00
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void envers(const char texte[]) {
unsigned position;
for(position = strlen(texte); position > 0 ; position--) {
printf("%c", texte[position-2]);
}
printf("\n");
}
int main(int argc, char** argv) {
if (argc < 2) {
printf("usage : %s <texte>\n", argv[0]);
return EXIT_FAILURE;
}
envers(argv[1]);
return EXIT_SUCCESS;
}