Guest User

Untitled

a guest
Jun 25th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. void memorizza(FILE*out,persona voc[],persona cons[],int*m1,int*m2)
  2. {
  3. if(out==NULL)
  4. {
  5. printf("errore nell'apertura dei file in lettura\n");
  6. }
  7. else
  8. {
  9. printf("\nMEMORIZZAZIONE NEI VETTORI IN CORSO....\n\n");
  10. int i,j;
  11. i=0;
  12. j=0;
  13. persona temp;
  14. while(!feof(out))
  15. {
  16. fscanf(out,"%s%d",&temp.nome,&temp.anni);
  17.  
  18. if(temp.nome[0]=='a'||temp.nome[0]=='e'||temp.nome[0]=='i'||temp.nome[0]=='o'||temp.nome[0]=='u')
  19. {
  20. voc[i]=temp;
  21. i++;
  22. }
  23. else
  24. {
  25. cons[j]=temp;
  26. j++;
  27. }
  28. }
  29. *m1=i;
  30. *m2=j;
  31. }
  32. }
Add Comment
Please, Sign In to add comment