From b975fd11366782750b96c6a73eee999b081da1b1 Mon Sep 17 00:00:00 2001 From: Balentins Date: Wed, 14 Dec 2016 09:27:11 +0100 Subject: [PATCH] il faut le tranformer en fonction --- fonctions centage | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 fonctions centage diff --git a/fonctions centage b/fonctions centage new file mode 100644 index 0000000..a78af58 --- /dev/null +++ b/fonctions centage @@ -0,0 +1,36 @@ + + +int centre(void) +{ +char v=0; + char b=0; + int L=0; + int C=0; + int col=0; + int lin=0; + int o=0; + while (v!='\0') + { + while (b!='\n') + { + b= fgetc(fichier); + C++; + } + // v= fgetc(fichier);peut etre pas besoin + L++; + b=0; + } + col=(80-C)/2; + lin=(80-L)/2; + for (o=80*lin+col+1; o<=80*24-(80*lin+col+1); o++) + { + v=0; + v= fgetc(fichier); + tableau1[o]=v; + if (o%80==79-col) + { + o+=C+1; + } + } +return 0; +}