1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Rep Power

    An algorithm for an IPO chart

    Hi everyone,

    I am new to the forum. I would like to know if someone can offer me some assistance. I am currently taking a beginners programming class and I want to know if someone can help me to write an algorithm for an IPO chart.

    I am supposed to write an algorithm for a program that calculates and displays the volume of a rectangular box. Can someone help?

  2. #2
  3. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    Here is an example program for the geometrical problem. I don't know anything about money so I can't help you with the IPO chart.
    void display_sphere(double radius,double volume) {
      int c;
      puts("       -------");
      puts("    --/       \\--");
      puts("   /             \\");
      puts("  /               \\");
      puts("  |               |");
      puts("  \\               /");
      puts("   \\             /");
      puts("    --\\       /--");
      puts("       -------");
      printf("Volume is %g cubic lengths\n",volume);
      puts("Use the arrow keys or mouse to rotate the sphere about any axis.");
      puts("Press enter to terminate.");
      while ((EOF != (c = getchar())) && ('\n' != c))
    #define TAU (2*M_PI)  /* http://www.youtube.com/watch?v=jG7vhMMXagQ */
    double compute_sphere_volume(double radius) {
      /* Skip the triple integral and use the formula */
      return (2*TAU/3)*radius*radius*radius;
    int main() {
      double radius;
      char buffer[30];
      puts("Enter sphere radius:");
      sscanf(buffer,"%lf ",&radius);
      return 0;
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo