|
|
|
|
Bonsoir,
en fait là j'ai besion d'aide,
un truc tout bete , simple comme bonjour,
l'utilisation de la fonction "atof"
voilà ce que j'ai fait dans mon programme:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
main()
{float x;
int i;
char ch[100];
puts("donnez ch");
gets(ch);
x=atof(ch);
scanf("%f",x);
getch();
}
alors dites moi ce qui est faux!
peut etre qu'apres tout rien juste!!!!!!!!!!
puisque ça ne veut pas marcher.
merci.
Selia.
Salut,
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(int argc, char * argv[])
{
float x;
int i;
char ch[100];
puts(" donnez ch");
gets(ch);
puts(ch);
x = atof(ch);
printf(" atof : %f", x);
scanf("%f", &x);
printf(" float : %f", x);
getch();
return 0;
}
|
Répondre à kciop
|
Bonjour,
|