hey guys so I'm having this problem i don't fully understand c++ but I'm trying, so what I'm trying to do is a program that where you could calculate the x and y co-ordinates, as well as the angle, for the holes of a circular bolt pattern.
User input: number of points, diameter, x co-ordinate of center, y co-ordinate of center.
this is what i got so far but im having problems with the loop:
using namespace std;
int main ()
{
//variables
float x, y , Diameter_of_circle, points_loc;
float degrees, x2, y2, radius;
int points;
cout<<setprecision(2); //specifies the number of digits after decimal point
cout<<fixed<<showpoint;
cout<< "Enter the number of points: ";
cin>> points;
cout<< "Enter the Diameter of the circle: ";
cin >> Diameter_of_circle;
cout<< "Location of circle center on x: " ;
cin>> x;
cout<< "Location of circle center on Y: " ;
cin>> y;
cout<< endl;
first im pretty sure fixed is a function and what is show point? whats M_PI? at the for loop why are you multiplying i by points? it will only loop once
M_PI is how the system uses the function of pi instead of declaring it as a variable, show point as far as i know is just to show the point in a decimal answer so it comes out as for example 9.32 and i was multiplying by points so it could change the angle but yup it was probably a mistake. how could you do it so it loops = the number of points