Help with basic program

Hello, this program only runs to the point where I insert the value for "aoa". Why is it not running through my function and printing it out after? Thanks



#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

int main()
{

double aoa;
cout << "Enter angle of attack in degrees:" << endl;
cin >> aoa;

double C;
long double pi = (atan(1)*4);
C = 1.3*sin((2*pi*aoa)/95)

cout << "The coefficient of lift given an angle of:" << aoa << "is " C << endl;

return 0;
}

Last edited on
Please, use the code tags (the <> formatting button), to the right of this box, when posting code.

It makes it easier to read your code and also easier to respond to your post.

http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/

Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.


Some syntax errors:
Missing a semicolon here:
C = 1.3*sin((2*pi*aoa)/95)
Should be:
C = 1.3*sin((2*pi*aoa)/95);

Also, missing the << operator here:
cout << "The coefficient of lift given an angle of:" << aoa << "is " C << endl;

Should be:
cout << "The coefficient of lift given an angle of:" << aoa << "is " << C << endl;
Last edited on
Topic archived. No new replies allowed.