Pour ma part j'éviterais de travailler directement avec le pointeur passé en entrée. (*nbseqcrois par exemple). Pour la clarté du code, j'utiliserais plutôt une variable et en fin de traitement, j'affecterais la valeur de cette variable à la variable pointée par nbseqcrois.
Sinon si ça ne marche pas et que tu ne vois pas, c'est que ton code est illisible. Tu devrais décomposer ton code en fonctions de 4 à 5 lignes maximum …
Ensuite, choisir correctement le nom de tes variables : éviter t et n, comme paramètre de fonction, ça veut rien dire. N'oublie jamais que programmer ce n'est pas seulement écrire un truc pour que la machine puisse décoder, c'est aussi, et surtout, faire en sorte que toi-même et les autres puissent te relire et comprendre à partir du code ce que tu veux faire.
Par exemple, tu veux faire quoi avec cette séquence de code ? :
voidpositif(int*n){do{printf("donner le nbre d'element du tableau :");scanf("%d",n);}while(*n<=0);}
Je ne te garantis pas par contre les caractéristiques, parce que je n'ai aucune étiquette dessus. Faut que je retrouve une machine chez moi qui accepte de démarrer avec ce genre de barrette. J'(en ai une mais faut que je remette la main dessus ..
1/ Tu as combien de slots dispo ? 1 seul ? Parce que je dois avoir des barrettes de 1 Gb qui trainent chez moi … Par contre je ne sais pas a quelle vitesse elles tournent.
[^] # Re: <troll-title>Futur chef de projet</troll-title>
Posté par totof2000 . En réponse au message Warnings de compilation et résultat incorrect. Évalué à 1.
Bah, au moins il a fourni du code c'est déjà un début.
Mais je le comprends, le C j'ai eu beaucoup de al au début. Mais une fois que j'ai compris la logique ça s'est très bien passé.
[^] # Re: Enfin pas de warnings mais résultat incorrect
Posté par totof2000 . En réponse au message Warnings de compilation et résultat incorrect. Évalué à 4.
Pour ma part j'éviterais de travailler directement avec le pointeur passé en entrée. (*nbseqcrois par exemple). Pour la clarté du code, j'utiliserais plutôt une variable et en fin de traitement, j'affecterais la valeur de cette variable à la variable pointée par nbseqcrois.
Sinon si ça ne marche pas et que tu ne vois pas, c'est que ton code est illisible. Tu devrais décomposer ton code en fonctions de 4 à 5 lignes maximum …
Ensuite, choisir correctement le nom de tes variables : éviter t et n, comme paramètre de fonction, ça veut rien dire. N'oublie jamais que programmer ce n'est pas seulement écrire un truc pour que la machine puisse décoder, c'est aussi, et surtout, faire en sorte que toi-même et les autres puissent te relire et comprendre à partir du code ce que tu veux faire.
Par exemple, tu veux faire quoi avec cette séquence de code ? :
[^] # Re: Fréquence ?
Posté par totof2000 . En réponse au message RAM pour vieux Netbook.. Évalué à 1.
Sinon j'ai aussi une barrette qui ressemble à ça :
https://www.cdiscount.com/informatique/memoire-ram/2-go-gb-memoire-ram-ddr2-pc2-4200-533mhz-non-ecc-p/f-10716-auc6004260099426.html
Je ne te garantis pas par contre les caractéristiques, parce que je n'ai aucune étiquette dessus. Faut que je retrouve une machine chez moi qui accepte de démarrer avec ce genre de barrette. J'(en ai une mais faut que je remette la main dessus ..
Cordialement.
[^] # Re: Fréquence ?
Posté par totof2000 . En réponse au message RAM pour vieux Netbook.. Évalué à 1.
1/ Tu as combien de slots dispo ? 1 seul ? Parce que je dois avoir des barrettes de 1 Gb qui trainent chez moi … Par contre je ne sais pas a quelle vitesse elles tournent.
# Un peu de lecture ...
Posté par totof2000 . En réponse au message Scanner réseau marche pas, please help. Évalué à 3.
https://wiki.debian.org/SaneOverNetwork
Cordialement.