circumference at latitude

closed account (4w7X92yv)
Dear

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <cmath>

using namespace std;

int main()                                                                      
{
    double straal;
    double omtrek;
    double cosinus;
    
    cosinus = (cos (51));
    straal = (40075 * cosinus);
    omtrek = (2 * 3.1415926535 * straal);
    
    cout << cosinus << endl;
    cout << straal << endl;
    cout << omtrek << endl;
      
system ("pause");
return 0;
}


I wrote the following code:

It should calculate the circumference at latitude but it does something wrong,
it outputs the wrong cosisnus, straal (radius) and omtrek (circumference).

What do i do wrong?
Please help me.

Best Regards
Joriek
Last edited on
The cos function operates in radians.
closed account (4w7X92yv)
thanks
Topic archived. No new replies allowed.