Ответ:
#include <iostream>
int main()
{
std::string s1, s2 , s3, ans;
std::cin >> s1 >> s2 >> s3;
for (int i = 0; i < s1.size(); i++)
s1[i] = tolower(s1[i]);
for (int i = 0; i < s2.size(); i++)
s2[i] = tolower(s2[i]);
for (int i = 0; i < s3.size(); i++)
s3[i] = tolower(s3[i]);
std::cout << s1 << ' ' << s2 << ' ' << s3;
for (int i = 0; i < 5; i++)
ans += s1[i];
ans += s2[i];
ans += s3[i];
std::cout << '\n' << ans;
}
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
#include <iostream>
int main()
{
std::string s1, s2 , s3, ans;
std::cin >> s1 >> s2 >> s3;
for (int i = 0; i < s1.size(); i++)
s1[i] = tolower(s1[i]);
for (int i = 0; i < s2.size(); i++)
s2[i] = tolower(s2[i]);
for (int i = 0; i < s3.size(); i++)
s3[i] = tolower(s3[i]);
std::cout << s1 << ' ' << s2 << ' ' << s3;
for (int i = 0; i < 5; i++)
ans += s1[i];
for (int i = 0; i < 5; i++)
ans += s2[i];
for (int i = 0; i < 5; i++)
ans += s3[i];
std::cout << '\n' << ans;
}
Объяснение: