### The sine Rule

I am basically trying to make a program for a calculator. I am struggling with how to do the sine calculation. this calculation will take place at line 158. Any help will be highly appreciated. Thanks

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183`` ``````#include #include using namespace std; int main() { double firstNumber = 0.0; double secondNumber = 0.0; char operation =' '; do { cout << "welcome to Calculator++." << endl; cout << " " << endl; cout << "Select Operation" << endl; cout << "1. Standard calculator operations" << endl; cout << "2. Trigonometry" << endl; cout << "3. Statistics" << endl; int M; cin >> M; if ( M == 1 ){ cout << " " << endl; cout << "1. Addition" << endl; cout << "2. Subtraction" << endl; cout << "3. Multiplication" << endl; cout << "4. Division" << endl; cout << "5. Square a number" << endl; cout << "6. Cube a number" << endl; cout << "7. Exponent's ( X^n)" << endl; cout << "8. Squareroot" << endl; cout << "9. Cuberoot" << endl; cout << "10. Log [log10(x)]" << endl; cout << "11. Finding the length of a hypotenuse" << endl; } { int Op; cout << " " << endl; cout << "Enter first Number" << endl; cin>>firstNumber; cout << " " << endl; cout << "Enter Operation number (1 to 11)" << endl; cin>>Op; cout << " " << endl; cout << "Enter second Number (enter zero for operation 5, 6, 8, 9 & 10)" << endl; cin>>secondNumber; cout << " " << endl; if ( Op == 1){ cout << "the answer is..."<>Op1; cout << " " << endl; if ( Op1 == 1){ cout << "Enter angle" << endl; cin>>angle; cout << " " << endl; cout << "the answer is..." <>angle; cout << " " << endl; cout << "the answer is..." <>angle; cout << " " << endl; cout << "the answer is..." <>angleA; cout << " " << endl; cout << "Enter length A" << endl; cin>>lengthA; cout << " " << endl; cout << "Enter length B" << endl; cin>>lengthB; cout << " " << endl; cout << "the answer is..." << } } if ( M == 3 ){ cout << "1. " << endl; //* cout << "2. " << endl; cout << "3. " << endl; cout << "4. " << endl; cout << "5. " << endl; cout << "6. " << endl; cout << "7. " << endl; return 0; } } while (true); } ``````
Topic archived. No new replies allowed.