Answer the question
In order to leave comments, you need to log in
Why is C++ result rounded?
a=Edit1->Text;
b=Edit2->Text;
double m=StrToInt(a);
double n=StrToInt(b);
double o=StrToInt(Edit4->Text);
double sina=sin(o*PI/180);
double sinb=n/(m/sina);
B=asin(sinb);
B=B*180/PI;
Edit5->Text = B;
tested with values a=5 b=6 A=30. the result is 38, although it actually turns out to be 36.8698976458 why is it rounded off?
Answer the question
In order to leave comments, you need to log in
Perhaps you have somewhere where int is used during calculations, look at it more carefully. What type B?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question