fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string st="Hello, world!", s, t;
  6. cout<< "Вывод строки через пробел: "<<endl ;
  7. for (int i=0; i<st.length(); i++)
  8. cout<<st[i]<<endl;
  9. cout<<endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 4748KB
stdin
Standard input is empty
stdout
Вывод строки через пробел: 
H
e
l
l
o
,
 
w
o
r
l
d
!