Mega Code Archive

 
Categories / C++ / Data Type
 

Decimal in decimal

#include <iostream> using namespace std; int main() {   int x = 100;   double f = 98.6;   double f2 = 123456.0;   double f3 = 1234567.0;   cout.setf(ios::dec, ios::basefield);   cout << "x in decimal: " << x << "\n\n";   return 0; }