Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- short c[1001], i, n, pal;
- int main()
- {
- cin >> n;
- for (i=0; i<n; ++i)
- {
- cin >> c[i];
- }
- for (i=0; i<n; ++i)
- cout << c[i];
- cout << "\n";
- pal=1;
- for (i=0; i<n/2; ++i)
- if (c[i]!=c[n-i-1]) { pal=0; break; }
- if (pal) cout << "DA";
- else cout << "NU";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement