Advertisement
edutedu

vr 25 pr4

Apr 8th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8. char a[20], b[20]="";
  9. int n, m, i, j, k=0;
  10. cin.get(a,20);
  11. n=strlen(a)-1;
  12. for(i=n; i>=0; i--)
  13. {
  14. b[k]=a[i];
  15. k++;
  16. }
  17. if(strstr(a,b)!=0)
  18. cout<<"Corect";
  19. else
  20. cout<<"Incorect";
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement