Thread: More help please

  1. #1
    Registered User marcusbankuti's Avatar
    Join Date
    Mar 2002
    Posts
    32

    More help please

    #include <iostream.h>
    #include <stdlib.h>
    #include <string.h>
    #include <conio.h>

    int main()
    {
    int pi;
    {
    cout << 1/2.545584412*8;
    system("pause");
    }
    return 0;
    }

    That is my new code. Now, it shows only 3.1427, how do I get it do display more digits? Also, when beside the equation, I take away the ;, and << /n;, the program does not run, and when it is <<"/n";, It does not work.

  2. #2
    Registered User marcusbankuti's Avatar
    Join Date
    Mar 2002
    Posts
    32
    Sorry, this was supposed to be a reply. I will repost it as a reply in the "My PI Program" thread.

    Moderator, please delete this.

  3. #3
    what are you trying to do with this program? You have pi declared, but are doing nothing with it. Plus you got another set of braces inside the main function.

  4. #4
    Registered User marcusbankuti's Avatar
    Join Date
    Mar 2002
    Posts
    32
    I have pi declared because I forgot to get rid of it while trying to rid it of a bug. I want the program to display infinite digits it PI.

Popular pages Recent additions subscribe to a feed