1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| #include<stdio.h>
#include<string.h>
#define sep ".,\"?"
#define line 100
int main()
{
// int i;
char *test;
int valore;
char *word;
char linea[line];
do{
printf("line : ");//printf("%d\n",i);
fgets(linea,line,stdin);
if(strlen(linea)>0){
word=strtok(linea,sep);
// printf(" %d\t",atoi(word));
// valore=atoi(word);
while(word){
// valore=atoi(word);
printf(" %d\t",atoi(word));
printf("\n %s\t",word);
word=strtok(NULL,sep);
}
}
}
while(strlen(linea)!=0);
return 0;
} |