Disable "e+" in Number Outputs?

This is a discussion on Disable "e+" in Number Outputs? within the C++ Programming forums, part of the General Programming Boards category; Whenever I execute the following program, Code: /* * Problem 48.cpp */ #include <iostream.h> #include <math.h> int main() { double ...

  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,185

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, 08:18 AM
  2. Need help with this compiler error
    By Evangeline in forum C Programming
    Replies: 7
    Last Post: 04-05-2008, 10:27 AM
  3. adding a number to a number
    By bigmac(rexdale) in forum C Programming
    Replies: 11
    Last Post: 10-24-2007, 01:56 PM
  4. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 05:25 AM
  5. help with a source code..
    By venom424 in forum C++ Programming
    Replies: 8
    Last Post: 05-21-2004, 01:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21