Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3.  
  4. using namespace std;
  5.  
  6. #define N 20
  7.  
  8. unsigned short dlugosc;
  9. char napis[N+1];
  10. int i;
  11.  
  12. int main()
  13. {
  14.     cout << "Wpisz wyraz " << endl;
  15.     cin >> napis;
  16.     dlugosc = strlen(napis);
  17.     for(i = dlugosc-1; i >= 0; i--) cout << napis[i];
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement