#include <bits/stdc++.h> using namespace std; int main() { int a = 123456; string s = to_string(a); cout << "s = " << s << endl; char str1[] = "123456"; int x = atoi(str1); cout << "x = " << x << endl; char str2[] = "12345.6789"; double y = atof(str2); printf("%.4lf\n",y); return 0; }