cs_JCDjcd
Messages postés1138Date d'inscriptionmardi 10 juin 2003StatutMembreDernière intervention25 janvier 2009
-
30 juil. 2003 à 09:57
cs_alima
Messages postés5Date d'inscriptiondimanche 19 février 2006StatutMembreDernière intervention21 février 2007
-
10 mars 2006 à 17:06
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
cs_alima
Messages postés5Date d'inscriptiondimanche 19 février 2006StatutMembreDernière intervention21 février 2007 10 mars 2006 à 17:06
C'est bon mais je veux un progrmme qui lit un nombre réel et l'écrit en toute lettre en code c
franky_cool
Messages postés8Date d'inscriptionmercredi 1 octobre 2003StatutMembreDernière intervention20 octobre 2003 23 oct. 2003 à 22:07
Bravo! Je trouve que c un beau ptit code...
cs_JCDjcd
Messages postés1138Date d'inscriptionmardi 10 juin 2003StatutMembreDernière intervention25 janvier 20094 30 juil. 2003 à 22:59
Il est vrai ! j'ai revu mes cour d'orthographe !
Mais bon pour 200, 400,300,ect ...
gagah1
Messages postés509Date d'inscriptionsamedi 28 juin 2003StatutMembreDernière intervention 3 août 2010 30 juil. 2003 à 21:57
Merci pour tous ça, mais 456 s'écrit quatre cent cinquante six(sans le s), c'est une question d'orthographe!!!
cs_JCDjcd
Messages postés1138Date d'inscriptionmardi 10 juin 2003StatutMembreDernière intervention25 janvier 20094 30 juil. 2003 à 09:57
Voici ton main :
******************************************************************
int main()
{
unsigned int x = 0;
char choix = 'o',c[256];
while((choix=='o')||(choix=='O'))
{
cout << "Introduire un chiffre entier : ";
cin >> x;
ChiffreEnLettre(x,c);
cout << "
En lettre ca fait : "<< c <<endl;
cout << "
Encore d'autre? (O/N): ";
choix = getche();
cout << "
================================================="<<endl;
}
return 0;
}
******************************************************************
saches que tu peux faire :
******************************************************************
int main(void)
{
unsigned int x = 0;
char choix,
c[256];
do
{
cout << "Introduire un chiffre entier : ";
cin >> x;
ChiffreEnLettre(x,c);
cout << "
En lettre ca fait : "<< c <<endl;
cout << "
Encore d'autre? (O/N): ";
choix = getche();
cout << "
================================================="<<endl;
}while((choix=='o')||(choix=='O')); // on teste apres la boucle
return 0;
}
******************************************************************
Il manque les 's' :
456 -> quatre cent ...
quatre cents ...
Mais bon, c'est bien, bien que se soit assez bourrin !
10 mars 2006 à 17:06
23 oct. 2003 à 22:07
30 juil. 2003 à 22:59
Mais bon pour 200, 400,300,ect ...
30 juil. 2003 à 21:57
30 juil. 2003 à 09:57
******************************************************************
int main()
{
unsigned int x = 0;
char choix = 'o',c[256];
while((choix=='o')||(choix=='O'))
{
cout << "Introduire un chiffre entier : ";
cin >> x;
ChiffreEnLettre(x,c);
cout << "
En lettre ca fait : "<< c <<endl;
cout << "
Encore d'autre? (O/N): ";
choix = getche();
cout << "
================================================="<<endl;
}
return 0;
}
******************************************************************
saches que tu peux faire :
******************************************************************
int main(void)
{
unsigned int x = 0;
char choix,
c[256];
do
{
cout << "Introduire un chiffre entier : ";
cin >> x;
ChiffreEnLettre(x,c);
cout << "
En lettre ca fait : "<< c <<endl;
cout << "
Encore d'autre? (O/N): ";
choix = getche();
cout << "
================================================="<<endl;
}while((choix=='o')||(choix=='O')); // on teste apres la boucle
return 0;
}
******************************************************************
Il manque les 's' :
456 -> quatre cent ...
quatre cents ...
Mais bon, c'est bien, bien que se soit assez bourrin !