Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by 111 ( 18 years ago )
#include "stdafx.h"
#include "stdio.h"
#include "conio.h"
#include "stdlib.h"
#include "new.h"
#include "windows.h"
#include "string.h"
int _tmain(int argc, _TCHAR* argv[])
{
char OpenText[_MAX_PATH];
char Key[_MAX_PATH];
int i=0;
int j=0;
int LenghtOpenText=0;
int LenghtKey=0;
printf ("Input OpenText: ");
gets(OpenText);
LenghtOpenText=strlen(OpenText);
printf ("Lenght OpenText: %dn",LenghtOpenText);
printf ("nInput Key: ");
gets(Key);
LenghtKey=strlen(Key);
printf ("Lenght Key: %dn",LenghtKey);
int Column=0;
Column = int(LenghtOpenText/LenghtKey);
char Massive[_MAX_PATH][_MAX_PATH];
for (i=0;i<LenghtKey;i++)
for (j=0;j<Column;j++)
{
Massive[0][j]=Key[j];
Massive[i+1][j]=OpenText[j];
}
printf ("nMassive: ");
for (i=0;i<LenghtKey;i++)
for (j=0;j<Column;j++)
{
printf ("%s ",Massive[i][j]);
printf ("n");
}
_getch ();
return 0;
}
Revise this Paste