Pai daca ai numere mari, folosesti string-ul:
Pascal:
var
s:string;
i:byte;
begin
read(s);
for i:=0 to length(s)-1 do
if s[i+1]<>s[length(s)-i] then
begin
writeln('NU');
exit
end;
writeln('DA');
end.
C++:
#include <iostream>
#include <cstring>
using namespace std;
char s[80];
int main()
{
cin >> s;
for(unsigned i=0;i<strlen(s);i++)
if(s[i]!=s[strlen(s)-1-i])
{
cout << "NU";
return 0;
}
cout << "DA";
return 0;
}