Modifications
This commit is contained in:
parent
e280898bf4
commit
0c9e48cc41
4
TP3/E6.c
4
TP3/E6.c
|
@ -3,7 +3,7 @@
|
|||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#define N 10
|
||||
#define N 20
|
||||
|
||||
int length(char* c) {
|
||||
int i, len = -1;
|
||||
|
@ -17,7 +17,7 @@ int length(char* c) {
|
|||
}
|
||||
|
||||
int number(char c) {
|
||||
return c-48;
|
||||
return c - '0';
|
||||
}
|
||||
|
||||
int atoiMaison(char* c) {
|
||||
|
|
4
TP3/E7.c
4
TP3/E7.c
|
@ -29,6 +29,8 @@ int main() {
|
|||
char c[N];
|
||||
printf("Entrez du texte : ");
|
||||
scanf("%s", &c);
|
||||
printf("Miroir : %s\n", miroir(c));
|
||||
char* m = miroir(c);
|
||||
printf("Miroir : %s (addresse : 0x%x)\n", m, &m);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
all: $(patsubst %.c,%.exe,$(shell ls *.c))
|
||||
|
||||
%.exe: %.c
|
||||
gcc $< -o $@
|
||||
gcc $< -o $@ -lm
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
|
|
Reference in a new issue