Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- int znak;
- printf("Podaj czy chcesz zaszyfrować (1) czy odszyfrować (0)");
- scanf("%d",&znak);
- char w,w1;
- char y;
- int i;
- int o=1;
- char g[7][7];
- FILE *in; char bufor[512];
- if ((in = fopen("tab1", "rt"))== NULL)
- {
- fprintf(stderr, "\nBlad otwarcia pliku!\n");
- return 1;
- }
- else
- {
- while (feof(in)==0)
- {fgets(bufor, 512, in);
- for (i=0;bufor[i]!='\n';i++)
- {
- if(i%7==0)
- {
- o++;
- printf("\n");
- }
- g[1][i]=bufor[i];
- printf("%c",g[1][i]);
- }
- }
- printf("\n");
- }
- fclose(in);
- }
- ~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement