Prosze o pomoc w znalezieniu co jest w kodzie nie tak:
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main(){
char tab[100][100];
char tab1[100];
char tab2[100];
int dlugosc,j=0,wys,x=0;
printf("Podaj tekst do kodowania: ");
scanf("%s",tab1);
printf("Podaj wysokosc plotka: ");
scanf("%d",&wys);
dlugosc=strlen(tab1);
for(int i=0; i<dlugosc;){
for(j=0; j<wys; j++){
tab[j][i]=tab1[i];
i++;
}
for(;j>0; j--){
tab[j][i]=tab1[i];
i++;
}
}
for(int a=0; a<100; a++){
for(int b=0;b<100;b++){
if (tab[a][b]!='\0')
tab2[x]=tab[a][b];
x++;
}}
printf("\nPo dekodowaniu: %s",tab2);
getch();
return 0;
}