Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- // считайте пять слов и выведите их первые символы слитно
- string str1, str2, str3, str4, str5;
- char sym1, sym2, sym3, sym4, sym5;
- cin >> str1 >> str2 >> str3 >> str4 >> str5;
- sym1 = str1[0];
- sym2 = str2[0];
- sym3 = str3[0];
- sym4 = str4[0];
- sym5 = str5[0];
- cout << sym1 << sym2 << sym3 << sym4 << sym5;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement