Skip to content
Snippets Groups Projects
Commit aa308cd8 authored by Ilyas TIOUASSIOUINE's avatar Ilyas TIOUASSIOUINE
Browse files

Version à modifier avec en particulier ajout_carac_chaine(s,c) au milieu laissé en commentaire

parent 5273da66
No related branches found
No related tags found
No related merge requests found
//indent -nut -i2.
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <chaine.h>
int main(){
int c;
struct chaine s;
int i;
i = 0; //nombre de caractères mis dans s
init_chaine8(s);
c = getchar();
while (!isspace(c))
{
if (i < ((s.compt)-1)){
putchar(c);
//ajout_carac_chaine(s, c)
s.champ[i] = (char)c;
i = i + 1;
c = getchar();
}
else {
alonge_chaine8(s)
}
}
s.champ[i] = '\0';
putchar ('\n');
affiche_chaine(s);
clear_chaine(s);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment