#include <iostream.h>
#include <conio.h>
void main(){
char chiper[100], password[10];
char a[20][20],b='a';
int bar,kol,x=0,i=0;
cout<<"Masukkan Chipertext : ";cin>>chiper;
cout<<"Masukkan Password : "; cin>>password;
bar=strlen(chiper)/strlen(password);
kol=strlen(password);
while(i<kol)
{while(b<'z')
{for(int z=0; z<kol; z++)
{if(password[z]==b)
{i++;
for(int j=0; j<bar; j++)
{a[j][z]=chiper[x];x++;}}
}
b++;}}
for(int c=0; c<bar; c++)
{for(int d=0; d<kol;d++)
{cout<<a[c][d];}
cout<<endl;}
getch();}
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar