Source : http://stackoverflow.com/
#include
using namespace std;
int main(){
double num1;
cin>>num1;
if(static_cast
cout<<"Integer"<
else
cout<<"Not Integer"<
return 0;
}
char *test = "asdf1234";
int i;
for (i = 0; i < strlen (test); i++)
{
if (isdigit (test[i]))
fprintf (stdout, "test[%d] is a digit!\n", i);
}
0 comments:
Post a Comment