#include <stdlib.h>
#include <time.h>
void Form1::nouveau()
{
    QString nb_restant="10";
    LCDNumber1->display(nb_restant);
    srand((unsigned) time (NULL));
    nb_hasard=rand()%500;
}

void Form1::verif()
{
    bool ok;
    QString nb_str=LineEditNb->text();
    int nb=nb_str.toInt(&ok,10);
    QString affich;
    if (nb>nb_hasard)
    {
	affich="Trop grand !";
    }
    else if (nb<nb_hasard)
    {
	affich="Trop petit !";
    }
    else
    {
	affich="Bravo !!!";
    }
    int nb_compteur=LCDNumber1->intValue();
    nb_compteur++;
    
    TextLabelInfo->setText(affich);
    
}
