Hi there. I am taking a beginners c++ course and having problems using the sin and cos functions. It's have problems converting to radians etc even with the formulas in it. It's probably a stupid mistake...
I'd appreciate if anyone could help out....thanks!
#include <stdio.h>
#include <math.h>
//Program body
int main()
{
double pi, r, theta, thetaRad, x ,y;
pi = 3.1415;
thetaRad = 0;
printf("Enter the value of r: ");
scanf("%d", &r);
printf("the value for r you entered was %d \n", r);
printf("Enter the value of the angle, theta: ");
scanf("%d", &theta);
printf("the value for theta you entered was %d\n", theta);
thetaRad = theta * pi / 180;
printf("the value for thetaRad you entered was %d\n", thetaRad);