#include <iostream>
#include <string>
const unsigned int maxSize = 100;
int main()
{
std::string str1;
std::string str2;
unsigned int equals = 0;
unsigned int percentageOfMatches = 0;
for (unsigned int i = 0; i < maxSize; i++)
{
//тут push_back твоих значений для str1 и str2(заполнение строк)
//тут сравнение строк
if (str1[i] == str2[i])
{
equals++;
}
}
percentageOfMatches = maxSize / equals;
std::cout << percentageOfMatches ;
}