Bonjour à tous,
Le printf est de moi :o/
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 /* Gregory Pietsch <gkp1@flash.net> * tente de répondre aux questions du livre de K&Richie */ /* * Here's my attempt at a Category 0 version of 1-10. * * Gregory Pietsch */ #include <stdio.h> int main() { int c, d; while ( (c=getchar()) != EOF) { printf("------------- %d", c); d = 0; if (c == '\\') { putchar('\\'); putchar('\\'); d = 1; } if (c == '\t') { putchar('\\'); putchar('t'); d = 1; } if (c == '\b') { putchar('\\'); putchar('b'); d = 1; } if (d == 0) putchar(c); } return 0; }
J'ai compilé avec cygwin sur windows 10 64bits $ x86_64-w64-mingw32-gcc C:/JPD/c/K_R/solutions/krx11010.c -o C:/JPD/C/K_R/solutions/krx11010.exe
sans problème mais il n'affiche rien à la console .....
Merci de votre attention
JPDaviau
Partager