User Profile

Collapse

Profile Sidebar

Collapse
Coco Agozzino
Coco Agozzino
Last Activity: Nov 4 '11, 06:00 PM
Joined: Nov 1 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Coco Agozzino
    replied to file output for circle points and radius
    in C
    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?
    See more | Go to post

    Leave a comment:


  • Coco Agozzino
    started a topic file output for circle points and radius
    in C

    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...
    See more | Go to post
No activity results to display
Show More
Working...