Developpement/23DEV1.1/TPS1/TP01/16-Débogueur/TutoS.c

20 lines
402 B
C
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void envers(const char texte[]) {
int position;
for(position = strlen(texte)-1; position >= 0; position--) {
printf("%c", texte[position]);
}
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;
}