Untitled
unknown
plain_text
2 years ago
688 B
8
Indexable
#include <iostream>
#include <string.h>
using namespace std;
string a_bc(string& a, string& b, string& c, string &d) {
if (a.size()) {
if ((a[0] >= 97) && (a[0] <= 122)) {
a[0] -= 32;
}
}
if (b.size()) {
if ((b[0] >= 97) && (b[0] <= 122)) {
b[0] -= 32;
}
}
if (c.size()) {
if ((c[0] >= 97) && (c[0] <= 122)) {
c[0] -= 32;
}
}
d += a;
d += ' ';
d += b[0];
d += ". ";
d += c[0];
d += '.';
return d;
}
int main(){
string a, b, c, d;
cin >> a >> b >> c;
d = "";
cout << a_bc(a, b, c, d);
return 0;
}Editor is loading...
Leave a Comment