Si tu connais le C++ en mode texte, essaie de faire un jeu de loto, ou alors un jeu de 421, ou de yam ! Si tu te sens d´attaque, essaie de faire jouer la machine !
Cela se fait en mode texte
Si tu connais autre chose que le texte, dis moi tout
inconnu[pure]
Niveau 6
16 mars 2004 à 20:41:26
>Mon niveau est debutant >Je vais tenter ma chance au jeu de loto. >Comme je commence ben je connais que le texte. >pour le lien tu cliques dessus.
Sinon j´ai compiler ton listing et visibement ya un probleme pendant l´execution.
inconnu[pure]
Niveau 6
19 mars 2004 à 14:16:23
slt j´ai reglé le problem d´hier mais j´ai un nouveau problem l´ordinateur ne gere pas un nombre au hasad je placerais un et un la où normalement l´ordinateur gere le nombre hasard
/ /Jeux de loto
include < iostream>
include < stdlib.h>
using namespace std;
class loto { int n[5]; int Score; int nbh[5];
public : loto ( int a, int b, int c, int d, int e); hasard ( int max); void score ( ); void affiche ( ); };
loto::loto ( int a, int b, int c, int d, int e) { int max = 0; int i; for ( i=0; i<5; i++) nbh[i] = ( rand()) / RAND_MAX * max; n[0] = a; n[1] = b; n[2] = c; n[3] = d; n[4] = e; }
int n[5]; int choisir = 0; while(choisir < 5) { choisir++; cin > > n[choisir]; cout < < " Tu as choisis pour le nombre " < < choisir < < " : " < < n[choisir] < < " \n" ; } loto suite1 ( n[1], n[2], n[1], n[2], n[3]); suite1.score ( ); suite1.affiche ( ); return 0; }
Merci pour toute reponse
inconnu[pure]
Niveau 6
19 mars 2004 à 14:17:42
Pardon pour la faute
/ / Jeux de loto
include < iostream>
include < stdlib.h>
using namespace std;
class loto { int n[5]; int Score; int nbh[5];
public : loto ( int a, int b, int c, int d, int e); hasard ( int max); void score ( ) ; void affiche ( ) ; };
loto::loto ( int a, int b, int c, int d, int e) { int max = 0; int i; for ( i=0; i<5; i++) nbh[i] = ( rand()) / RAND_MAX * max; n[0] = a; n[1] = b; n[2] = c; n[3] = d; n[4] = e; }