In the main function of C:
void main(int argc, char **argv) { // do something here }
In the command line, we will type any number for ex
Another way of doing it is by using isdigit function. Below is the code for it:
#include #include #include #include #define MAXINPUT 100 int main() { char input[MAXINPUT] = ""; int length,i; scanf ("%s", input); length = strlen (input); for (i=0;i