2.Напишите программу с использованием циклического оператора для посимвольного перебора строки
#include
#include
using namespace std;
int main() {
string str = \"Hello\";
}
#include
#include
using namespace std;
int main() {
string str = \"Hello\";
}
Ответ
0
(0 оценок)
0
#include<iostream>
#include<string>
using namespace std;
signed main() {
string str = "Hello";
for (int i = 0; i < str.length();i++){
cout << str[i] << " ";
}
return 0;
}