I tried the following:
for(int i=1; i<=n; i++)
{
angle=2*M_PI*(i/n);
x=r*cos(angle);
y=r*sin(angle);
}
fout.precision( 2);
fout<<setw(6)<< x<<setw(6)<<y<< endl;
fout.close();
return 0;
}
how do i get it to outpoint all the point?
User Profile
Collapse
Profile Sidebar
Collapse
Coco Agozzino
Last Activity: Nov 4 '11, 06:00 PM
Joined: Nov 1 '11
Location:
-
file output for circle points and radius
1. Prompt and read in the number of sample points. Read and store this number as an integer.
2. Prompt and read in the circle radius. Read and store this number as a double precision floating point number.
3. Prompt and read in the output file name. Read and store the file name as a C++ string. Include the C++ command “#include <string>” to use C++ strings.
5. Open the file for output. Make sure...
No activity results to display
Show More
Leave a comment: