linkedin facebook linkedin facebook nod32

Borland C++ Builder

Muallif: Mengliyev Shoydullo

Qo`shilgan sana: 2014-10-27

1. Borland C++ Builder Chiziqli algoritmlarni dasturlash

1.1-masala. A va B ikkita haqiqy sonlar berilgan. Ularning yig’indisi, ayirmasi va ko’paytmasini hisoblang. Yechish. A va b sonlar yig’indisini S, ayirmasini D, ko’paytmasini K bilan belgilasak, S=a+b, d=a-b, k=a*b formulalar o’rinli bo’ladi.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float a,b,s,p;
a=StrToFloat(Edit1->Text);
b=StrToFloat(Edit2->Text);
s=a+b;
p=a*b;
Edit3->Text=FloatToStr(s);
Edit4->Text=FloatToStr(p);
}

1.2-masala. Birinchi hadi B, maxraji Q va hadlari soni N ga teng geometrik progressiyaning hadlarining yig’indisini hisoblang.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float B,q,n,S;
B=StrToFloat(Edit1->Text);
q=StrToFloat(Edit2->Text);
n=StrToFloat(Edit3->Text);
S=(B*(1-exp(N*ln(q))))/(1-q);
Edit4->Text=FloatToStr(S);
}

1.3-masala. Uchta idishga suv solingan. Idishlardagi suvning temperaturasi T1, T2, T3 ga teng, hajmi V1, V2, V3 (l) ga teng. Idishlardagi suvni bitta idishga quyilsa, uning hajmi va temperaturasi qanday bo’ladi?

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float T1,T2,T3,T,V1,V2,V3,V;
T1=StrToFloat(Edit1->Text);
T2=StrToFloat(Edit2->Text);
T3=StrToFloat(Edit3->Text);
V1=StrToFloat(Edit4->Text);
V2=StrToFloat(Edit5->Text);
V3=StrToFloat(Edit6->Text);
T=(T1*V1+T2*V2+T3*V3)/(V1+V2+V3);
V=V1+V2+V3;
Edit7->Text=FloatToStr(T);
Edit8->Text=FloatToStr(V);
}

1.4-masala. Berilgan sonning butun qismini aniqlang.
Yechish. A sonning butun qismini B bilan belgilasak, B=int(A) formula bilan aniqlanadi.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float a,b,s;
a=StrToFloat(Edit1->Text);
b=StrToFloat(Edit2->Text);
s=a div b;
Edit3->Text=FloatToStr(s);
}

1.5-masala. N/M ifodani hisoblashda hosil bo’ladigan qoldiqni toping.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float N,M,R;
N=StrToFloat(Edit1->Text);
M=StrToFloat(Edit2->Text);
R= N mod M;
Edit3->Text=FloatToStr(R);
}
1.6-masala. Sonni berilgan aniqlikda yaxlitlang.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float A,N,B;
A=StrToFloat(Edit1->Text);
N=StrToFloat(Edit2->Text);
B=INT(A*EXP(N*LN(10))+0.5)/EXP(N*LN(10));
Edit3->Text=FloatToStr(B);
}

1.7-masala. Berilgan burchakni radian o’lchovidan gradus o’lchoviga o’tkazing.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float alfa,k;
alfa=StrToFloat(Edit1->Text);
k=StrToFloat(Edit2->Text);
k=alfa*pi/180;
Edit2->Text=FloatToStr(k);
}

1.8-masala. Berilgan burchakni gradus o’lchovidan radian o’lchoviga o’tkazing.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float a,b;
a=StrToFloat(Edit1->Text);
b=a*180/pi;
Edit2->Text=FloatToStr(b);
}

1.9-masala. Aylananing uzunligi C berilgan. Shu aylana bilan chegaralangan doiraning yuzi S ni aniqlang.

Borland C++ Builder da dasturu:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
float c,S;
c=StrToFloat(Edit1->Text);
S=c*c/(4*pi);
Edit2->Text=FloatToStr(S);
}

1.10-masala. Radiuslari A va R ga teng (A

Borland C++ Builder da dasturu:
#include
void __fastcall TForm1::Button1Click(TObject *Sender)
{
const float pi=3.14;
float a,r,s;
a=StrToFloat(Edit1->Text);
r=StrToFloat(Edit2->Text);
if (a if (a>r) s=pi*(r*r-a*a);
Edit3->Text=FloatToStr(s);
}

1089 marta o`qildi.

Foydalanuvchi ismi: Javlonbek
Qo`shilgan sana: 2015-06-09

Barchasini Dev C++ da qilib ko`rdim. O`xshamayaptiku Javob: Math berilishi kerak

Parol:
Eslab qolish.


Ro`yhatdan o`tish

testing

+998915878681

Siz o`z maxsulotingizni 3D reklama ko`rinishda bo`lishini xohlaysizmi? Unda xamkorlik qilamiz.

3D Reklama


Рейтинг@Mail.ru
Рейтинг@Mail.ru

Besucherzahler
счетчик посещений