#include <iostream>
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
int main()
{
char str[100], pair[3] = {'\0'};
int i, j, len, count=0, equal_flag;
char **arr;
setlocale(LC_ALL,"Russian");
printf<<"Введите слово: ";
scanf("%s", str);
len = strlen(str);
arr = new char*[len-1];
for(i = 0; i < len-1; ++i)
{
pair[0] = str[i];
pair[1] = str[i+1];
equal_flag = 0;
for(j = 0; j < count; ++j)
if(!strcmp(pair, arr[j]))
{
equal_flag = 1;
break;
}
if(equal_flag == 0)
{
arr[count++] = new char[3];
strcpy(arr[count-1], pair);
}
}
printf("\nКоличество пар в слове = %d\n\n", count);
for(j = 0; j < count; ++j)
delete[] arr[j];
delete[] arr;
return(0);
}