Guest User

Untitled

a guest
Jul 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int events, couples, k = 0, j = 0;
  6.  
  7. FILE *fp;
  8. fp = fopen("input.txt", "r");
  9.  
  10. fscanf(fp, "%d", &events);
  11. fscanf(fp, "%d", &couples);
  12.  
  13. char* array[couples];
  14.  
  15. while( k < events )
  16. {
  17. k++;
  18. for( j; j < couples; j++ )
  19. {
  20. fscanf(fp, "%s", &array[j]);
  21. printf("%s", array[j]);
  22. }
  23. }
  24.  
  25.  
  26. getch();
  27. }
Add Comment
Please, Sign In to add comment