Trigonometric functions cos0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<conio.h>
#include<iostream.h>
#include<math.h>
void main()
{
clrscr();
double a,p=3.14159265358979323846;
int x;
float rad,b,c;
cout<<"Enter PhotoshopTalha a number to convert into in radian";
cin>>x;
a=x*(p/180);
cout<<a<<endl<<a;
cout<<"sin = "<<sin(a)<<endl;
cout<<"Cose = "<<cos(a);
getch();
}


it gives wrong cos0 Value.plz check
It gives correct cos0 value.

In other news, this
void main()
is not C++

and this
#include<iostream.h>
is pre-standard (over a decade old).

Your code above shouldn't even compile. Let me guess; using a decade-old compiler? Maybe Dev-Cpp? Please throw it away and get something better, for free.
Topic archived. No new replies allowed.