AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Notendurchschnitt

Ein Thema von Tobias2610 · begonnen am 2. Feb 2007 · letzter Beitrag vom 2. Feb 2007
 
Benutzerbild von Tobias2610
Tobias2610

Registriert seit: 3. Jan 2007
Ort: LSC
14 Beiträge
 
Delphi 5 Standard
 
#1

Notendurchschnitt

  Alt 2. Feb 2007, 11:36
Gude!
Ich hab 'n Problem mit Delphi! Ich kann einfach nicht den Notendurschnitt berechen.
Ist zwar viel aber bitte um Hilfe!
So siehts aus!

Gruß

Delphi-Quellcode:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, Buttons, Menus;

type
  TForm1 = class(TForm)
    Label1: TLabel;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    BitBtn5: TBitBtn;
    BitBtn6: TBitBtn;
    Shape1: TShape;
    Shape2: TShape;
    Shape3: TShape;
    Shape4: TShape;
    Shape6: TShape;
    Shape7: TShape;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    Label12: TLabel;
    Label13: TLabel;
    Label14: TLabel;
    Label15: TLabel;
    Label16: TLabel;
    Label17: TLabel;
    MainMenu1: TMainMenu;
    Datei1: TMenuItem;
    Schlieen1: TMenuItem;
    Info1: TMenuItem;
    PrintDialog1: TPrintDialog;
    Copyright1: TMenuItem;
    Gebrauchsinfo1: TMenuItem;
    Bearbeiten1: TMenuItem;
    Reset1: TMenuItem;
    Drucken1: TMenuItem;
    Label18: TLabel;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
    procedure BitBtn4Click(Sender: TObject);
    procedure BitBtn5Click(Sender: TObject);
    procedure BitBtn6Click(Sender: TObject);
    procedure Schlieen1Click(Sender: TObject);
    procedure PrintDialog1Close(Sender: TObject);
    procedure Drucken1Click(Sender: TObject);
    procedure Copyright1Click(Sender: TObject);
    procedure Gebrauchsinfo1Click(Sender: TObject);
    procedure Label17Click(Sender: TObject);
    procedure Reset1Click(Sender: TObject);
 
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation
{TOBIAS GROß 29.01.2007}
{$R *.DFM}




var a,b,c,d,e,f,gesamt,durchschnitt : integer;
var a1,a2,a3,a4,a5,a6 : extended;




procedure TForm1.BitBtn1Click(Sender: TObject);

begin
     shape1.height :=shape1.height +7;
     shape1.top := shape1.top -7;
     a :=(a+1);
     label2.Caption := IntToStr(a);

     gesamt := (a+b+c+d+e+f);
     label14.caption :=IntToStr(Gesamt);
     Label8.Caption :=FloatToStrF(a/gesamt*100,ffnumber,5,2);
     Label9.Caption :=FloatToStrF(b/gesamt*100,ffnumber,5,2);
     Label10.Caption :=FloatToStrF(c/gesamt*100,ffnumber,5,2);
     Label11.Caption :=FloatToStrF(d/gesamt*100,ffnumber,5,2);
     Label12.Caption :=FloatToStrF(e/gesamt*100,ffnumber,5,2);
     Label13.Caption :=FloatToStrF(f/gesamt*100,ffnumber,5,2);




  

end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
     shape2.height :=shape2.height +7;
     shape2.top := shape2.top-7;
     b :=(b+1);
     label3.Caption := IntToStr(b);

     gesamt := (a+b+c+d+e+f);
     label14.caption :=IntToStr(Gesamt);
     Label8.Caption :=FloatToStrF(a/gesamt*100,ffnumber,5,2);
     Label9.Caption :=FloatToStrF(b/gesamt*100,ffnumber,5,2);
     Label10.Caption :=FloatToStrF(c/gesamt*100,ffnumber,5,2);
     Label11.Caption :=FloatToStrF(d/gesamt*100,ffnumber,5,2);
     Label12.Caption :=FloatToStrF(e/gesamt*100,ffnumber,5,2);
     Label13.Caption :=FloatToStrF(f/gesamt*100,ffnumber,5,2);

    



end;

procedure TForm1.BitBtn3Click(Sender: TObject);
begin
     shape3.height :=shape3.height +7;
     shape3.top := shape3.top -7;
     c :=(c+1);
     label4.Caption := IntToStr(c);

     gesamt := (a+b+c+d+e+f);
     label14.caption :=IntToStr(Gesamt);
     Label8.Caption :=FloatToStrF(a/gesamt*100,ffnumber,5,2);
     Label9.Caption :=FloatToStrF(b/gesamt*100,ffnumber,5,2);
     Label10.Caption :=FloatToStrF(c/gesamt*100,ffnumber,5,2);
     Label11.Caption :=FloatToStrF(d/gesamt*100,ffnumber,5,2);
     Label12.Caption :=FloatToStrF(e/gesamt*100,ffnumber,5,2);
     Label13.Caption :=FloatToStrF(f/gesamt*100,ffnumber,5,2);
end;

procedure TForm1.BitBtn4Click(Sender: TObject);
begin
     shape4.height :=shape4.height +7;
     shape4.top := shape4.top -7;
     d :=(d+1);
     label5.Caption := IntToStr(d);

     gesamt := (a+b+c+d+e+f);
     label14.caption :=IntToStr(Gesamt);
     Label8.Caption :=FloatToStrF(a/gesamt*100,ffnumber,5,2);
     Label9.Caption :=FloatToStrF(b/gesamt*100,ffnumber,5,2);
     Label10.Caption :=FloatToStrF(c/gesamt*100,ffnumber,5,2);
     Label11.Caption :=FloatToStrF(d/gesamt*100,ffnumber,5,2);
     Label12.Caption :=FloatToStrF(e/gesamt*100,ffnumber,5,2);
     Label13.Caption :=FloatToStrF(f/gesamt*100,ffnumber,5,2);
end;

procedure TForm1.BitBtn5Click(Sender: TObject);
begin
     shape7.height :=shape7.height +7;
     shape7.top := shape7.top -7;
     e :=(e+1);
     label6.Caption := IntToStr(e);

     gesamt := (a+b+c+d+e+f);
     label14.caption :=IntToStr(Gesamt);
     Label8.Caption :=FloatToStrF(a/gesamt*100,ffnumber,5,2);
     Label9.Caption :=FloatToStrF(b/gesamt*100,ffnumber,5,2);
     Label10.Caption :=FloatToStrF(c/gesamt*100,ffnumber,5,2);
     Label11.Caption :=FloatToStrF(d/gesamt*100,ffnumber,5,2);
     Label12.Caption :=FloatToStrF(e/gesamt*100,ffnumber,5,2);
     Label13.Caption :=FloatToStrF(f/gesamt*100,ffnumber,5,2);
end;

procedure TForm1.BitBtn6Click(Sender: TObject);
begin
     shape6.height :=shape6.height +7;
     shape6.top := shape6.top -7;
     f :=(f+1);
     label7.Caption := IntToStr(f);

     gesamt := (a+b+c+d+e+f);
     label14.caption :=IntToStr(Gesamt);
     Label8.Caption :=FloatToStrF(a/gesamt*100,ffnumber,5,2);
     Label9.Caption :=FloatToStrF(b/gesamt*100,ffnumber,5,2);
     Label10.Caption :=FloatToStrF(c/gesamt*100,ffnumber,5,2);
     Label11.Caption :=FloatToStrF(d/gesamt*100,ffnumber,5,2);
     Label12.Caption :=FloatToStrF(e/gesamt*100,ffnumber,5,2);
     Label13.Caption :=FloatToStrF(f/gesamt*100,ffnumber,5,2);
end;

procedure TForm1.Schlieen1Click(Sender: TObject);
begin
halt;
end;


procedure TForm1.PrintDialog1Close(Sender: TObject);
begin
Form1.print;
end;

procedure TForm1.Drucken1Click(Sender: TObject);
begin
form1.print;
end;

procedure TForm1.Copyright1Click(Sender: TObject);
begin
Showmessage('Dieses Programm wurde erstellt von Tobias Groß Version: v1.2 WICHTIG! Leider muss in dieser Programmversion der Notendurchschnitt manuell berechnet werden! SORRY! Außerdem: Sollten andere Farbkombis gewünscht sein, einfach ne Mail an: [email]tobias.gross@web.de[/email]');

end;

procedure TForm1.Gebrauchsinfo1Click(Sender: TObject);
begin
Showmessage('Um die Notenwerte zu erhöhen einfach auf den jeweiligen Button drücken. Danach, falls gewünscht, im Menü (oben) auf "Drucken" klicken und fertig! ');

end;

procedure TForm1.Label17Click(Sender: TObject);
begin

Label17.Caption :=FloatToStrF(durchschnitt,ffgeneral,5,2);



end;



procedure TForm1.Reset1Click(Sender: TObject);
begin
halt;
;
end;

end.
Tobias
Gruß Tob!@as
*****************VIVA LOS TIOZ******************
HÖRST DU DIESE LIEDER, BÖHSE ONKELZ IMMER WIEDER
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:13 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz