begin process at 2010 02 10 06:04:58
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Maths

 > RÉVISEZ LES TABLE DE MULTIPLICATION

RÉVISEZ LES TABLE DE MULTIPLICATION


 Information sur la source

Note :
Aucune note
Catégorie :Maths Niveau :Débutant Date de création :20/06/2002 Date de mise à jour :09/01/2003 19:35:58 Vu / téléchargé :8 625 / 158

Auteur : FireChris

Ecrire un message privé
Commentaire sur cette source (0)
Ajouter un commentaire et/ou une note

 Description

Cliquez pour voir la capture en taille normale
Le programme sert à réviser ses table de multiplication !


    

Source

  • {Fait par FireChris}
  • unit Unit1;
  • interface
  • uses
  • Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  • Dialogs, ExtCtrls, Grids, Buttons, StdCtrls, Gauges, Spin, ComCtrls;
  • type
  • TForm1 = class(TForm)
  • Gauge1: TGauge;
  • Label2: TLabel;
  • Label3: TLabel;
  • Label4: TLabel;
  • Label5: TLabel;
  • Label6: TLabel;
  • Button1: TButton;
  • StringGrid1: TStringGrid;
  • Button3: TButton;
  • Label1: TLabel;
  • SpinEdit1: TSpinEdit;
  • SpinEdit2: TSpinEdit;
  • SpinEdit3: TSpinEdit;
  • SpinEdit4: TSpinEdit;
  • Label7: TLabel;
  • Label8: TLabel;
  • Timer1: TTimer;
  • Button2: TButton;
  • LabeledEdit1: TLabeledEdit;
  • procedure FormCreate(Sender: TObject);
  • procedure Button1Click(Sender: TObject);
  • procedure Timer1Timer(Sender: TObject);
  • procedure Button3Click(Sender: TObject);
  • procedure Button2Click(Sender: TObject);
  • private
  • { Déclarations privées }
  • public
  • Procedure AfichNote;
  • procedure question;
  • procedure InitialGauge;
  • { Déclarations publiques }
  • end;
  • var
  • Form1: TForm1;
  • nb:integer;
  • implementation
  • {$R *.dfm}
  • //--------------------------------------------------------
  • procedure Tform1.question;
  • var a:integer;
  • begin
  • if (SpinEdit1.Value)>(SpinEdit2.Value)
  • then begin
  • a:=SpinEdit1.Value;
  • SpinEdit1.Value:=SpinEdit2.Value;
  • SpinEdit2.Value:=a;
  • end;
  • a:=nb;
  • repeat
  • nb:=random(SpinEdit2.Value+1);
  • until (nb>=SpinEdit1.Value) and (nb<>a);
  • a:=random(2);
  • if a=0
  • then
  • Label1.Caption:=IntToStr(nb)+' * '+IntToStr(SpinEdit4.Value)
  • else
  • Label1.Caption:=IntToStr(SpinEdit4.Value)+' * '+IntToStr(nb);
  • end;
  • //--------------------------------------------------------
  • procedure TForm1.FormCreate(Sender: TObject);
  • begin
  • Randomize;
  • end;
  • //---------------------------------------------------------
  • procedure TForm1.Button1Click(Sender: TObject);
  • var a:integer;
  • begin
  • if Button1.Caption='Vérifier'
  • then begin
  • InitialGauge;
  • if nb*SpinEdit4.Value=SpinEdit3.Value
  • then begin
  • a:=random(5);
  • case a of
  • 0:ShowMessage('très bien');
  • 1:ShowMessage('Magnifique');
  • 2:ShowMessage('Tu es le meilleur');
  • 3:ShowMessage('Même moi je n''aurais pas réussi');
  • 4:ShowMessage('Tu es trop bon');
  • end;
  • Label4.Caption:=IntToStr(StrToInt(Label4.Caption)+1);
  • Label5.Caption:=IntToStr(StrToInt(Label5.Caption)+1);
  • question;
  • end
  • else begin
  • a:=random(5);
  • case a of
  • 0:ShowMessage('tu me déçois. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  • 1:ShowMessage('domage. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  • 2:ShowMessage('Tu aurais pu faire mieux. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  • 3:ShowMessage('La prochaine fois ce sera bon. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  • 4:ShowMessage('ça va mal. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  • end;
  • Label5.Caption:=IntToStr(StrToInt(Label5.Caption)+1);
  • end
  • end
  • else begin
  • Button1.Caption:='Vérifier';
  • Button3.Enabled:=true;
  • Label7.Enabled:=false;
  • Label8.Enabled:=false;
  • Label2.Enabled:=false;
  • SpinEdit1.Enabled:=false;
  • SpinEdit2.Enabled:=false;
  • SpinEdit4.Enabled:=false;
  • question;
  • end;
  • if label5.Caption='20'
  • then begin
  • Button2.Enabled:=true;
  • Button1.Enabled:=false;
  • Button1.Caption:='Recomencer';
  • Button3.Enabled:=false;
  • Label1.Caption:='';
  • Label7.Enabled:=True;
  • Label8.Enabled:=True;
  • Label2.Enabled:=True;
  • SpinEdit1.Enabled:=True;
  • SpinEdit2.Enabled:=True;
  • SpinEdit4.Enabled:=True;
  • end
  • else Timer1.Enabled:=True;
  • end;
  • //--------------------------------------------------
  • procedure TForm1.Timer1Timer(Sender: TObject);
  • begin
  • Gauge1.Progress:=Gauge1.Progress+1;
  • if Gauge1.Progress=70
  • then Gauge1.ForeColor:=clYellow;
  • if Gauge1.Progress=85
  • then Gauge1.ForeColor:=clRed;
  • if Gauge1.Progress=100
  • then begin
  • InitialGauge;
  • Button1.Click;
  • end;
  • end;
  • //--------------------------------------------------------
  • procedure TForm1.Button3Click(Sender: TObject);
  • begin
  • Timer1.Enabled:=false;
  • Gauge1.Progress:=0;
  • Gauge1.ForeColor:=clLime;
  • Button1.Caption:='Continuer';
  • Button3.Enabled:=false;
  • Label7.Enabled:=True;
  • Label8.Enabled:=True;
  • Label2.Enabled:=True;
  • SpinEdit1.Enabled:=True;
  • SpinEdit2.Enabled:=True;
  • SpinEdit4.Enabled:=True;
  • Label1.Caption:='';
  • end;
  • //------------------------------------------------------
  • procedure Tform1.InitialGauge;
  • Begin
  • Timer1.Enabled:=False;
  • Gauge1.Progress:=0;
  • Gauge1.ForeColor:=clLime;
  • end;
  • //----------------------------------------------------
  • Procedure Tform1.AfichNote;
  • var a,b:integer;
  • non,notebis:string;
  • label ecrir;
  • begin
  • for a:=1 to 5 do
  • if StringGrid1.Cells[2,a]=''
  • then begin
  • goto ecrir;
  • end
  • else begin
  • if StrToInt(StringGrid1.Cells[2,a])<StrToInt(label4.Caption)
  • then begin
  • for b:=1 to 5-a do begin
  • non:=StringGrid1.Cells[1,5-b];
  • notebis:=StringGrid1.Cells[2,5-b];
  • StringGrid1.Cells[1,6-b]:=non;
  • StringGrid1.Cells[2,6-b]:=notebis;
  • end;
  • ecrir:
  • StringGrid1.Cells[1,a]:=LabeledEdit1.Text;
  • StringGrid1.Cells[2,a]:=label4.Caption;
  • Break;
  • end;
  • end ;
  • Label5.Caption:='0';
  • Label4.Caption:='0';
  • end;
  • //------------------------------------------------------
  • procedure TForm1.Button2Click(Sender: TObject);
  • begin
  • AfichNote;
  • Button2.Enabled:=false;
  • Button1.Enabled:=true;
  • end;
  • end.
{Fait par FireChris}

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, Grids, Buttons, StdCtrls, Gauges, Spin, ComCtrls;

type
  TForm1 = class(TForm)
    Gauge1: TGauge;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Button1: TButton;
    StringGrid1: TStringGrid;
    Button3: TButton;
    Label1: TLabel;
    SpinEdit1: TSpinEdit;
    SpinEdit2: TSpinEdit;
    SpinEdit3: TSpinEdit;
    SpinEdit4: TSpinEdit;
    Label7: TLabel;
    Label8: TLabel;
    Timer1: TTimer;
    Button2: TButton;
    LabeledEdit1: TLabeledEdit;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);

  private
    { Déclarations privées }
  public

  Procedure AfichNote;
  procedure question;
  procedure InitialGauge;
    { Déclarations publiques }
    
  end;

var
  Form1: TForm1;
  nb:integer;

implementation

{$R *.dfm}

//--------------------------------------------------------

procedure Tform1.question;
var a:integer;
begin

if (SpinEdit1.Value)>(SpinEdit2.Value)
then begin
a:=SpinEdit1.Value;
SpinEdit1.Value:=SpinEdit2.Value;
SpinEdit2.Value:=a;
end;

a:=nb;

repeat
nb:=random(SpinEdit2.Value+1);
until (nb>=SpinEdit1.Value) and (nb<>a);

a:=random(2);

if a=0
then
Label1.Caption:=IntToStr(nb)+' * '+IntToStr(SpinEdit4.Value)
else
Label1.Caption:=IntToStr(SpinEdit4.Value)+' * '+IntToStr(nb);

end;

//--------------------------------------------------------

procedure TForm1.FormCreate(Sender: TObject);
begin
Randomize;
end;

//---------------------------------------------------------

procedure TForm1.Button1Click(Sender: TObject);
var a:integer;
begin



if Button1.Caption='Vérifier'
then begin

  InitialGauge;

  if nb*SpinEdit4.Value=SpinEdit3.Value
  then begin
  a:=random(5);
  case a of
  0:ShowMessage('très bien');
  1:ShowMessage('Magnifique');
  2:ShowMessage('Tu es le meilleur');
  3:ShowMessage('Même moi je n''aurais pas réussi');
  4:ShowMessage('Tu es trop bon');
  end;
  Label4.Caption:=IntToStr(StrToInt(Label4.Caption)+1);
  Label5.Caption:=IntToStr(StrToInt(Label5.Caption)+1);
  question;
  end
  else begin
  a:=random(5);
  case a of
  0:ShowMessage('tu me déçois. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  1:ShowMessage('domage. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  2:ShowMessage('Tu aurais pu faire mieux. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  3:ShowMessage('La prochaine fois ce sera bon. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  4:ShowMessage('ça va mal. '+IntToStr(nb)+' * '+InttoStr(SpinEdit4.Value)+' = '+IntToStr(nb*SpinEdit4.Value));
  end;
  Label5.Caption:=IntToStr(StrToInt(Label5.Caption)+1);
  end
end
else begin
Button1.Caption:='Vérifier';
Button3.Enabled:=true;
Label7.Enabled:=false;
Label8.Enabled:=false;
Label2.Enabled:=false;
SpinEdit1.Enabled:=false;
SpinEdit2.Enabled:=false;
SpinEdit4.Enabled:=false;
question;
end;

if label5.Caption='20'
then begin
Button2.Enabled:=true;
Button1.Enabled:=false;
Button1.Caption:='Recomencer';
Button3.Enabled:=false;
Label1.Caption:='';
Label7.Enabled:=True;
Label8.Enabled:=True;
Label2.Enabled:=True;
SpinEdit1.Enabled:=True;
SpinEdit2.Enabled:=True;
SpinEdit4.Enabled:=True;
end
else Timer1.Enabled:=True;

end;

//--------------------------------------------------

procedure TForm1.Timer1Timer(Sender: TObject);
begin

Gauge1.Progress:=Gauge1.Progress+1;

if Gauge1.Progress=70
then Gauge1.ForeColor:=clYellow;

if Gauge1.Progress=85
then Gauge1.ForeColor:=clRed;

if Gauge1.Progress=100
then begin
InitialGauge;
Button1.Click;
end;

end;

//--------------------------------------------------------

procedure TForm1.Button3Click(Sender: TObject);
begin
Timer1.Enabled:=false;
Gauge1.Progress:=0;
Gauge1.ForeColor:=clLime;
Button1.Caption:='Continuer';
Button3.Enabled:=false;
Label7.Enabled:=True;
Label8.Enabled:=True;
Label2.Enabled:=True;
SpinEdit1.Enabled:=True;
SpinEdit2.Enabled:=True;
SpinEdit4.Enabled:=True;
Label1.Caption:='';
end;

//------------------------------------------------------

procedure Tform1.InitialGauge;
Begin
Timer1.Enabled:=False;
Gauge1.Progress:=0;
Gauge1.ForeColor:=clLime;
end;

//----------------------------------------------------

Procedure Tform1.AfichNote;
var a,b:integer;
    non,notebis:string;
    label ecrir;
begin
for a:=1 to 5 do

 if StringGrid1.Cells[2,a]=''
 then begin
 goto ecrir;
 end
  else begin
   if StrToInt(StringGrid1.Cells[2,a])<StrToInt(label4.Caption)
   then begin
   for b:=1 to 5-a do begin
   non:=StringGrid1.Cells[1,5-b];
   notebis:=StringGrid1.Cells[2,5-b];
   StringGrid1.Cells[1,6-b]:=non;
   StringGrid1.Cells[2,6-b]:=notebis;
   end;
   ecrir:
   StringGrid1.Cells[1,a]:=LabeledEdit1.Text;
   StringGrid1.Cells[2,a]:=label4.Caption;
   Break;


   end;
 
  end ;
Label5.Caption:='0';
Label4.Caption:='0';
end;


//------------------------------------------------------


procedure TForm1.Button2Click(Sender: TObject);
begin
AfichNote;
Button2.Enabled:=false;
Button1.Enabled:=true;
end;

end.


 Fichier Zip

Les Membres Club peuvent télécharger directement un fichier contenu dans le zip sans télécharger le zip en entier !
  • Project2.cfgTélécharger ce fichier [Réservé aux membres club]Voir ce fichier386 octets
  • Project2.dofTélécharger ce fichier [Réservé aux membres club]Voir ce fichier1 216 octets
  • Project2.dprTélécharger ce fichier [Réservé aux membres club]Voir ce fichier188 octets
  • Project2.resTélécharger ce fichier [Réservé aux membres club]876 octets
  • Unit1.~ddpTélécharger ce fichier [Réservé aux membres club]51 octets
  • Unit1.~dfmTélécharger ce fichier [Réservé aux membres club]5 777 octets
  • Unit1.~pasTélécharger ce fichier [Réservé aux membres club]5 229 octets
  • Unit1.dcuTélécharger ce fichier [Réservé aux membres club]9 648 octets
  • Unit1.ddpTélécharger ce fichier [Réservé aux membres club]51 octets
  • Unit1.dfmTélécharger ce fichier [Réservé aux membres club]5 817 octets
  • Unit1.pasTélécharger ce fichier [Réservé aux membres club]Voir ce fichier5 364 octets

Télécharger le zip


 Sources du même auteur

Source avec Zip Source avec une capture LECTEUR WAV, MP3... AVEC UNE PLAYLIST.

 Sources de la même categorie

Source avec Zip Source avec une capture CONVERTISSEUR D'UN NOMBRE DÉCIMAL EN BINAIRE ET HEXADECIMAL par ludokk
Source avec Zip Source avec une capture PREMIER OU PAS? par ludokk
Source avec Zip Source avec une capture CONJECTURE DU CARRÉ DES FACTEURS par Bacterius
Source avec Zip Source avec une capture GÉNÉRATEUR DE NOMBRES PSEUDO-ALÉATOIRES par Bacterius
Source avec Zip Source avec une capture ALGORITHME DE HASH LEA par Bacterius

Commentaires et avis

Aucun commentaire pour le moment.

 Ajouter un commentaire




Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2010
LMMJVSD
1234567
891011121314
15161718192021
22232425262728

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,640 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales