Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
419 B
0
Indexable
Never
#include <iostream>
#include <string>
using namespace std;
string func(string a, string b, int n) {
	int i,j;
	for (i = 0; i < n; i++)
	{
		a += '_';
	}
	for (i = 0; i < n; i++)
	{
		cin >> b;
		for (j = 0; j < n; j++)
		{
			if (a[j] == '_')
				a[j] = b[j];
		}
	}
	return a;
}
int main() {
	setlocale(LC_ALL, "Russian");
	string a{}, b;
	int i, j, n;
	cin >> n;

	cout << func(a, b, n);
};