Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
422 B
0
Indexable
Never
#include <iostream>
#include <cmath>
#include <math.h>
using namespace std;
void foo(string& fullname, string fam, string name, string otch)
{
	fullname = fam + " ";
	fullname.push_back(name[0]);
	fullname += '.';
	fullname.push_back(otch[0]);
	fullname += '.';
}

int main()
{
	string fullname, fam, name, otch;
	cin >> fam >> name >> otch;
	foo(fullname, fam, name, otch);
	cout << fullname << endl;
}
Leave a Comment