ΠŸΠΎΠΌΠΎΡ‰ΡŒ Π² ΡƒΡ‡Ρ‘Π±Π΅, ΠΎΡ‡Π΅Π½ΡŒ быстро...
Π Π°Π±ΠΎΡ‚Π°Π΅ΠΌ вмСстС Π΄ΠΎ ΠΏΠΎΠ±Π΅Π΄Ρ‹

Опис Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌΡƒ. 
Основи програмування Ρ‚Π° Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌΡ–Ρ‡Π½Ρ– ΠΌΠΎΠ²ΠΈ

Π Π΅Ρ„Π΅Ρ€Π°Ρ‚ΠŸΠΎΠΌΠΎΡ‰ΡŒ Π² Π½Π°ΠΏΠΈΡΠ°Π½ΠΈΠΈΠ£Π·Π½Π°Ρ‚ΡŒ ΡΡ‚ΠΎΠΈΠΌΠΎΡΡ‚ΡŒΠΌΠΎΠ΅ΠΉ Ρ€Π°Π±ΠΎΡ‚Ρ‹

Memo1→Lines→Add (CheckBox8→Caption+": «); Memo1→Lines→Add (CheckBox8→Caption+»: «); If (CheckBox9→Checked==true){ int h=1;int y; If (CheckBox9→Checked==true){ int h=1;int y; If (CheckBox8→Checked==true){ int h=1;int y; If (CheckBox8→Checked==true){ int h=1;int y; If (CheckBox1→Checked==true){ double summ=0; If (CheckBox1→Checked==true){ double summ=0… Π§ΠΈΡ‚Π°Ρ‚ΡŒ Π΅Ρ‰Ρ‘ >

Опис Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌΡƒ. Основи програмування Ρ‚Π° Π°Π»Π³ΠΎΡ€ΠΈΡ‚ΠΌΡ–Ρ‡Π½Ρ– ΠΌΠΎΠ²ΠΈ (Ρ€Π΅Ρ„Π΅Ρ€Π°Ρ‚, курсовая, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»ΡŒΠ½Π°Ρ)

Лістинг ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΈ.

//—————————————————————————————————————;

#include.

#pragma hdrstop.

#include.

#include.

#include «Unit1.h» .

#include «Unit3.h» .

#include «Unit4.h» .

#include «Unit5.h» .

//—————————————————————————————————————;

#pragma package (smart_init).

#pragma resource «*.dfm» .

TForm1 *Form1;

double a[100];

int i=1;

//—————————————————————————————————————;

__fastcall TForm1: TForm1(TComponent* Owner).

: TForm (Owner).

{.

}.

//—————————————————————————————————————;

void __fastcall TForm1: Button1Click (TObject *Sender).

{.

/*char * c = Edit1->Text.c_str ();

String b=Edit1->Text;

char str[] = c;

char delims[] = «#» ;

char *result = NULL;

result = strtok (str, delims);

while (result ≠ NULL) {.

// printf («result is «%s» «, result);

result = strtok (NULL, delims);

Memo1->Lines->Add (result);

}.

*/.

/* Edit1->Text+=" «;

int string_len = Edit1->Text.Length ();

char *string = new char[string_len];

memset (string, 0, string_len);

string = Edit1->Text.c_str ();

Memo1->Lines->Add (AnsiString (string));

Memo1->Lines->Add (string); */.

int string_len = Edit1->Text.Length ();

String b=Edit1->Text;

char *str = new char[string_len];

memset (str, 0, string_len);

str = Edit1->Text.c_str ();

char delims[] = «+» ;

char *result = NULL;

result = strtok (str, delims);

while (result ≠ NULL) {.

// printf («result is «%s» «, result);

result = strtok (NULL, delims);

Memo1->Lines->Add (result);

}.

}.

//—————————————————————————————————————;

/*double insertSort (double t[], size_t length) {.

int k, l, value;

for (k = 1; k < length; k++) {.

value = a[i];

for (l = k — 1; l >= 0 && t[l] > value; l—) {.

t[l + 1] = t[l];

}.

t[l + 1] = value;

}.

} */.

void __fastcall TForm1: Button2Click (TObject *Sender).

{.

Edit3->Text=Edit3->Text+Edit2->Text+" | «;

a[i]=StrToFloat (Edit2->Text);

i++;

}.

//—————————————————————————————————————;

void __fastcall TForm1: Button3Click (TObject *Sender).

{.

if (CheckBox1->Checked==true){ double summ=0;

int h=1;

while (h.

summ=summ+a[h];

h=h+1;

}.

summ=summ/i;

Memo1->Lines->Add (CheckBox1->Caption+" - «+ FloatToStr (summ));

}.

if (CheckBox2->Checked==true){.

double min=a[1];

int h=1;

while (h.

if (a[h]

h=h+1;

}

Memo1->Lines->Add (CheckBox2->Caption+" - «+ FloatToStr (min));

}

if (CheckBox3->Checked==true){

double max=a[1];

int h=1;

while (h

if (a[h]>max){max=a[h]; }

h=h+1;

}

Memo1->Lines->Add (CheckBox3->Caption+" - «+ FloatToStr (max));

}

if (CheckBox4->Checked==true){

int h, y; bool check=false;

while (h

check=false;

for (int t=2; t==a[h]-1; t++){

y = static_cast (a[h]);

if (y%t==0){check=true; break;}

}

if (check==false){Memo1->Lines->Add (FloatToStr (a[h]));}

h++;

}

}

if (CheckBox5->Checked==true){

double fel=i/2;

int y = static_cast (fel);

Memo1->Lines->Add (CheckBox5->Caption+" - «+ FloatToStr (a[y]));

}

if (CheckBox8->Checked==true){ int h=1;int y;

Memo1->Lines->Add (CheckBox8->Caption+": «);

while (h

y = static_cast (a[h]);

if (y%2==0){Memo1->Text=Memo1->Text+FloatToStr (a[h])+"; «;}

h=h+1;

}

}

if (CheckBox9->Checked==true){ int h=1;int y;

Memo1->Lines->Add (CheckBox9->Caption+": «);

while (h

y = static_cast (a[h]);

if (y%2≠0){Memo1->Text=Memo1->Text+FloatToStr (a[h])+"; «;}

h=h+1;

}

}

if (CheckBox10->Checked==true){

int h=1; int summ=0;

while (h

summ=summ+a[h];

h=h+1;

}

Memo1->Lines->Add (CheckBox10->Caption+" - «+ FloatToStr (summ));}

if (CheckBox11->Checked==true){int h=1; int summ=1;

while (h

summ=summ*a[h];

h=h+1;

}

Memo1->Lines->Add (CheckBox11->Caption+" - «+ FloatToStr (summ));}

if (CheckBox14->Checked==true){ Memo1->Lines->Add (CheckBox14->Caption+": «);

int h=i-1; int summ=0;

while (h≠0){

Memo1->Text=Memo1->Text+FloatToStr (a[h])+"; «;

h=h-1;

}

}

}

//—————————————————————————————————————;

void __fastcall TForm1: N1Click (TObject *Sender)

{

if (CheckBox1->Checked==true){ double summ=0;

int h=1;

while (h

summ=summ+a[h];

h=h+1;

}

summ=summ/i;

Memo1->Lines->Add (CheckBox1->Caption+" - «+ FloatToStr (summ));

}

if (CheckBox2->Checked==true){

double min=a[1];

int h=1;

while (h

if (a[h]

h=h+1;

}

Memo1->Lines->Add (CheckBox2->Caption+" - «+ FloatToStr (min));

}

if (CheckBox3->Checked==true){

double max=a[1];

int h=1;

while (h

if (a[h]>max){max=a[h]; }

h=h+1;

}

Memo1->Lines->Add (CheckBox3->Caption+" - «+ FloatToStr (max));

}

if (CheckBox4->Checked==true){

int h, y; bool check=false;

while (h

check=false;

for (int t=2; t==a[h]-1; t++){

y = static_cast (a[h]);

if (y%t==0){check=true; break;}

}

if (check==false){Memo1->Lines->Add (FloatToStr (a[h]));}

h++;

}

}

if (CheckBox5->Checked==true){

double fel=i/2;

int y = static_cast (fel);

Memo1->Lines->Add (CheckBox5->Caption+" - «+ FloatToStr (a[y]));

}

if (CheckBox8->Checked==true){ int h=1;int y;

Memo1->Lines->Add (CheckBox8->Caption+": «);

while (h

y = static_cast (a[h]);

if (y%2==0){Memo1->Text=Memo1->Text+FloatToStr (a[h])+"; «;}

h=h+1;

}

}

if (CheckBox9->Checked==true){ int h=1;int y;

Memo1->Lines->Add (CheckBox9->Caption+": «);

while (h

y = static_cast (a[h]);

if (y%2≠0){Memo1->Text=Memo1->Text+FloatToStr (a[h])+"; «;}

h=h+1;

}

}

if (CheckBox10->Checked==true){

int h=1; int summ=0;

while (h

summ=summ+a[h];

h=h+1;

}

Memo1->Lines->Add (CheckBox10->Caption+" - «+ FloatToStr (summ));}

if (CheckBox11->Checked==true){int h=1; int summ=1;

while (h

summ=summ*a[h];

h=h+1;

}

Memo1->Lines->Add (CheckBox11->Caption+" - «+ FloatToStr (summ));}

if (CheckBox14->Checked==true){ Memo1->Lines->Add (CheckBox14->Caption+": «);

int h=i-1; int summ=0;

while (h≠0){

Memo1->Text=Memo1->Text+FloatToStr (a[h])+"; «;

h=h-1;

}

}

}

//—————————————————————————————————————;

void __fastcall TForm1: N2Click (TObject *Sender)

{

Memo1->Clear ();

Edit1->Clear ();

Edit2->Clear ();

Edit3->Clear ();

}

//—————————————————————————————————————;

void __fastcall TForm1: sl1Click (TObject *Sender)

{

Form1->Close ();

}

//—————————————————————————————————————;

void __fastcall TForm1: r1Click (TObject *Sender)

{

AboutBox->Show ();

}

//—————————————————————————————————————;

void __fastcall TForm1: N4Click (TObject *Sender)

{

PagesDlg->Show ();

}

//—————————————————————————————————————;

ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΡŒ вСсь тСкст
Π—Π°ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ Ρ„ΠΎΡ€ΠΌΡƒ Ρ‚Π΅ΠΊΡƒΡ‰Π΅ΠΉ Ρ€Π°Π±ΠΎΡ‚ΠΎΠΉ