مثل اینکه اینجا هیچ کس جواب کس دیگه ای رو نمیده!
من هنوز خیلی کارم ابتدایی هستش اما خوب گیر کردم دیگه اگه میشه یه نفر بگه مشکل این چیه وقتی به قسمت switch میرسه مشکل پیدا میکنه .
در ضمن یه نفر یاد بده چجوری تو spoiler میزارن :blushing:
#include<iostream.h>
#include<math.h>
#include<stdio.h>
#include<conio.h>
int main()
{
long float p,r,e,hyp,z,g;
int f,d;
clrscr();
cout<<"Enter Your Angel\n";
cin>>p;
r=3.1415*p/180;
cout<<"\nYour angel Radian is"<< r;
e=sin(r);
cout<<"\nsin of your angel is"<<e;
cout<<"\nEnter the known side of Triangel";
cin>>d;
cout<<"\nif the side is OPP press 1 if it is HYP press 2";
cin>>f;
switch(f){
case 1:
hyp=e/d;
cout<<"\nYour HYP side is"<<hyp;
z=sqrt(hyp*hyp-d*d);
cout<<"\nThe ADJ side is"<< z;
cout<<"\nIn all : ADJ side HYP side OPP side"<< z << hyp <<d;
break;
case 2:
g=e*d;
cout<<"\nYour OPP side is"<<g;
z=sqrt(d*d-g*g);
cout<<"\nIn all: ADJ HYP side OPP side "<<z <<d <<g;
break;
default:
cout<<"Error!";
}
getchar();
return 0;
}