Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main()
  4.  
  5. {
  6.  
  7. int znak;
  8. printf("Podaj czy chcesz zaszyfrować (1) czy odszyfrować (0)");
  9. scanf("%d",&znak);
  10.  
  11. char w,w1;
  12. char y;
  13. int i;
  14. int o=1;
  15. char g[7][7];
  16.  
  17. FILE *in; char bufor[512];
  18. if ((in = fopen("tab1", "rt"))== NULL)
  19. {
  20. fprintf(stderr, "\nBlad otwarcia pliku!\n");
  21. return 1;
  22. }
  23. else
  24. {
  25.  
  26. while (feof(in)==0)
  27. {fgets(bufor, 512, in);
  28.  
  29.  
  30. for (i=0;bufor[i]!='\n';i++)
  31. {
  32.  
  33. if(i%7==0)
  34. {
  35. o++;
  36. printf("\n");
  37. }
  38. g[1][i]=bufor[i];
  39. printf("%c",g[1][i]);
  40. }
  41.  
  42. }
  43. printf("\n");
  44.  
  45. }
  46. fclose(in);
  47.  
  48. }
  49. ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement