By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,514 Members | 1,832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,514 IT Pros & Developers. It's quick & easy.

Scientific Notation

P: 14
I made a program to find 2 at the power of 601 and thanks to DeMan I was able to run it with a number being displayed, but now it's in scientific notation, so I was wondering if there was a way to display it without the scientific notation.
My program is the fallowing:

Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <math.h>
  3. #include <NTL/RR.h>
  4.  
  5. NTL_CLIENT
  6.  
  7. using namespace std;
  8.  
  9. RR a, x, y;
  10.  
  11. main()
  12. {
  13. x=2;
  14. y=601;
  15. a = pow(x,y);
  16. cout<<x<<" at the power of "<<y<<" = "<<a<<endl;
  17. cin.get();
  18. }
May 25 '07 #1
Share this Question
Share on Google+
1 Reply


100+
P: 208
Search google for unsetf() and look into the scientific flag...
May 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.