debut TP16

This commit is contained in:
2023-11-07 17:30:28 +01:00
parent 3d18e26fd9
commit 940fdfe265
12 changed files with 129 additions and 3 deletions

20
DEV1.1/TP16/tutoriel2.c Normal file
View File

@@ -0,0 +1,20 @@
#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;
}