Zdravim, pokud zadám a=66.55 tak r1 vychází správně ale r2 ne (r2 by se mělo rovnat 0, ale vychází 3,05...). Nevíte v čem je problém?
cin >> d;
cin >> a;
if(d==172){
r1=23.45+90-a;
r2=23.45-90+a;
cout << r2;
if(c==0){
if (a==90){
cout << endl << "\t" << r1 << " severni sirky";}
if (a<90 && a>66.55){
cout << endl << "\t" << r1 << " severni sirky";
cout << endl << "\t" << r2 << " severni sirky";}
if (a==66.55){
cout << endl << "\t" << r1 << " severni sirky";
cout << endl << "\t" << r2 << " rovnik";}
if (a<66.55 && a>23.45){
cout << endl << "\t" << r1 << " severni sirky";
cout << endl << "\t" << -r2 << " jizni sirky";}
if (a==23.45){
cout << endl << "\t" << r1 << " severni sirky";
cout << endl << "\t" << -r2 << " jizni sirky";}
if (a<23.45){
cout << endl << "\t" << -r2 << " jizni sirky";}}