Advertisement
neogz

REK - obrnuti tekst .

Aug 19th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void rf(){
  5.     char znak;
  6.     cin >> znak;
  7.  
  8.     if (znak != '.')
  9.     {  
  10.         rf();
  11.         cout << znak;
  12.     }
  13.     else cout << "Vas tekst obrnuto je ovakav: \n";
  14. }
  15. int main(){
  16.  
  17.     cout << "Unesite tekst: " << endl;
  18.     rf();
  19.  
  20.     system("pause>null");
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement