Help!

Hello! i'm new to C++ programming and i'm trying my best to figure this out. But this is driving me insane. I'm getting an expected ')' error maybe my program is wrong or something. Thanks for the help

1
2
3
4
5
6
7
8
9
10
11
12
13
14
  #include <iostream.h>
#include <conio.h>
#include <math.h>
int main()
{
clrscr();
int x,cos;
cout<<"Enter The Value:";
cin>>x;
cos = (1-(x pow2/2)+(x pow4/4*3*2*1/)-(x pow6/6*5*4*3*2*1/));
cout<<cos;
getch();
return 0;
}
the correct syntax for invoking pow is :
pow(x,exponent)
you have several syntax errors in cos because you are incorrectly invoking that function, change that, see if it runs then.
yes, it worked. Thank you so much :D
Topic archived. No new replies allowed.