locked
I'm getting the C2143 missing ';' before 'string' error. Please help me i.d the problem. RRS feed

  • Question

  • #include <iostream>;
    #include <cmath>;
    using namespace std;
    int main()
    {
    float a, b, c, A, A1, B1, B, tot1, tot2, tot3;
    char done, an;
    #define PI = 3.14;
    cout<< "input value of a \n";
    cin >> a;
    cout << "input value of b \n";
    cin >> b;
     tot1 = a*a + b*b;
     c = sqrt(tot1) ;
     cout << c "\n";

     tot2 = (b*b + c*c - a*a) / 2 * b*c;

    A1= acos(tot2);
    A = A1 * 180;
    cout << A "\n" ;
    cin >> done;
    tot3 = (a*a + c*c - b*b) / 2 * a*c;
    B1 = acos(tot3);
    B = B1 * 180;
    cout << B "\n" ;
    cin >> done;
    cout << "C is equal to 90 degrees \n " ;
    return 0;

    };

    I'm new to coding entirely so as simple as possible please.

     
    Wednesday, February 3, 2016 3:43 PM

Answers

All replies