void __fastcall TForm1::TrackBar1Change(TObject *Sender)
{
int x;
double y,y1;
x=TrackBar1->Position;
Label1->Caption=IntToStr(x);
y=(1.00*x);
y1=y*(M_PI/180.00);
Label2->Caption="sin: "+FloatToStrF(sin(y),ffGeneral,2,2);
Label3->Caption="cos: "+FloatToStrF(cos(y),ffGeneral,2,2);
Label4->Caption="tg: "+FloatToStrF(sin(y)/cos(y),ffGeneral,2,2);
Label5->Caption="ctg:"+FloatToStrF(1.00/(sin(y)/cos(y)),ffGeneral,2,2);
Label6->Caption="sin: (rad) "+FloatToStrF(sin(y1),ffGeneral,2,2);
Label7->Caption="cos: (rad) "+FloatToStrF(cos(y1),ffGeneral,2,2);
Label8->Caption="tg: (rad) "+FloatToStrF(sin(y1)/cos(y1),ffGeneral,2,2);
Label9->Caption="ctg: (rad) "+FloatToStrF(1.00/(sin(y1)/cos(y1)),ffGeneral,2,2);
}
Brak komentarzy:
Prześlij komentarz