Hi,
I am trying to set up a program to allow the user to enter an odd number between 3 and 31. The program will then divide 360 between 1 and the user input-1. For example say the user enters 7, the program should divide 360 to each value 1, 2, 3, 4, 5, 6. I could really do with the program to divide by 0 as well so that the total values the 360 would divide into would be 7. So now the program should have the values 360/1, 360/2, 360/3, 360/4, 360/5 etc. These values are degrees which i need to take the sin of.
To try and tackle this problem i have used a counter to count from 1 upto the user input -1.
for ( i=0; i=uservalue-1; i++) Stored these values into an array, then divided 360 into each element by saying a = i and then a = 360 / a. Next the sin calculation is used by saying a = sin(a). Now apparantly sin only works with radians, everytime i convert my degrees into radians and do the sin of them i get no minus values!
How else can i calculate the degrees from the user input. Ive spent weeks trying to sort this out, really beginning to hate c++!!