Advertisement
Razija

nesto za recenicu

May 27th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. //nece da pokrene
  4. using namespace std;
  5.  
  6. int main(){
  7. string recenica;
  8. char x[20];
  9. cout<<"Unesite recenicu: ";
  10. getline(cin, recenica);
  11.  
  12. for (int i = 0; i <= recenica.length(); i++) {
  13. x[i] = recenica[i];
  14. cout << x[i];
  15. if (recenica[i] == ' ') {
  16. cout << endl;
  17. }
  18.  
  19. }
  20.  
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement