Untitled

 avatar
unknown
c_cpp
a year ago
564 B
4
Indexable
#include <iostream>
using namespace std;

void fio(string& r, string f, string i, string o) {
	if (f[0] >= 65 and f[0] <= 90) {
		r += f;
	}
	else {
		f[0] -= 32;
		r += f;
	}
	r += ' ';
	if (i[0] >= 65 and i[0] <= 90) {
		r.push_back(i[0]);
	}
	else {
		i[0] -= 32;
		r.push_back(i[0]);
	}
	r += '.';
	if (o[0] >= 65 and o[0] <= 90) {
		r.push_back(o[0]);
	}
	else {
		o[0] -= 32;
		r.push_back(o[0]);
	}
	r.push_back('.');
	cout << r;
}

int main() {
	string s = "";
	string f, i, o;
	cin >> f >> i >> o;
	fio(s, f, i, o);
}
Editor is loading...
Leave a Comment