APL/APL1.1/TP16/envers.c

22 lines
425 B
C
Raw Normal View History

2021-10-18 17:27:52 +02:00
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void envers(const char texte[]) {
int position; //Ligne à changer
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;
}