je debute ca fait une semaine que j'ai commencer le C et g creer un petit programme mais il ne marche pas !! quelqu' un pourrait t'il m'aider et me dire quel sont mes erreur voici mon prog merci
* Name: codesecret
Copyright: lol
Author: newbieratus
Date: 04/09/04 20:57
Description: codeSecret.c :trouver le code secret en 10 essais */
#include <stdio.h>
#include <iostream.h>
int main()
{
printf << "Vous avez 10 essais pour trouver le nombre secret.\n\nPressez ENTRER pour commencer" << endl;
getchar();
int secret;
secret = 56 = z;
int k;
for(k = 10; k > 0; k--)
{
int b;
printf << "Il vous reste " << k << " essai(s)." << endl << endl;
printf << "Veuillez entrer une proposition : ";
cin >> b;
if(b > z)
{
printf << b << " est trop grand !" << endl << endl;
}
else if(b < z)
{
printf << b << " est trop petit !" << endl << endl;
}
else if(b == z)
{
break;
}
}
if(k != 0)
{
printf << "\n\n\n***felicitations tu as trouvé le nombre secret***" << endl;
}
else if(k == 0)
{
printf << "\n\n\n***LOOSER meme ma ptite soeur arrive a gagner .lol***" << endl;
}
getchar();
}