Thread: Disable "e+" in Number Outputs?

  1. #1
    Registered User Anonymous's Avatar
    Join Date
    Dec 2010
    Location
    Palm Beach County, FL
    Posts
    2

    Question Disable "e+" in Number Outputs?

    Whenever I execute the following program,


    Code:
    /*
     *  Problem 48.cpp
     */
    
    #include <iostream.h>
    #include <math.h>
    
    int main()
    {
    	double Power = 1;
    	double Sum = 0;
    	do {
    		Sum = pow(Power,Power);
    		cout<<Sum<<endl;
    		Power++;
    	}
    	while (Power <= 10);
    	return(0);
    }
    I get the following output in Terminal:

    Code:
    1
    4
    27
    256
    3125
    46656
    823543
    1.67772e+07 // Right here, and below, where the "e+" is
    3.8742e+08
    1e+10
    logout
    
    [Process completed]
    How do I disable that and have it output the actual number without scientific notation?

    Using Mac OS X and Xcode 3.2

    Thanks,
    Anonymous

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ thread inside a class hang issue
    By diefast9 in forum C++ Programming
    Replies: 11
    Last Post: 10-21-2009, 07:18 AM
  2. Need help with this compiler error
    By Evangeline in forum C Programming
    Replies: 7
    Last Post: 04-05-2008, 09:27 AM
  3. adding a number to a number
    By bigmac(rexdale) in forum C Programming
    Replies: 11
    Last Post: 10-24-2007, 12:56 PM
  4. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 04:25 AM
  5. help with a source code..
    By venom424 in forum C++ Programming
    Replies: 8
    Last Post: 05-21-2004, 12:42 PM