#include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
char buf[20];
int a = 10;
sprintf(buf, "%d", a);
for(int I=0;I<log10(a)+1; I++){
cout<<buf[I]<<" ";
}
return 0;
}
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
char buf[20];
int a = 10;
sprintf(buf, "%d", a);
for(int I=0;I<log10(a)+1; I++){
cout<<buf[I]<<" ";
}
return 0;
}
No comments:
Post a Comment