Mega Code Archive
Categories
/
C++
/
Data Type
Using atof
#include
#include
using namespace std; int main() { double d = atof( "99.0" ); cout << "The string \"99.0\" converted to double is " << d << "\nThe converted value divided by 2 is " << d / 2.0 << endl; return 0; }