#include #include #include #include typedef struct{ char text[30]; int num1, num2, num3; }sa_phi; sa_phi sp[999]; int main(){ FILE *f; int i=0, num_of_file=0; f = fopen("readme.txt","rt"); while(!feof(f)){ char tmp[999], *p; fgets(tmp,90,f); // Doc tung dong char **b = (char **) malloc(100*sizeof(char)); p = strtok(tmp," \""); int index=0; //Luu chuoi da duoc tach vao mang b while(p!=NULL){ b[index] = p; index++; p = strtok(NULL," \""); } //Chuyen doi so strcpy(sp[i].text, b[0]); sp[i].num1 = atoi(b[1]); sp[i].num2 = atoi(b[2]); sp[i].num3 = atoi(b[3]); i++; //Dem So dong` } printf("So dong doc duoc la: %d\n",i); num_of_file = i; for(i=0;i