Răspuns :
var n,m,i,k:integer;beginreadln(n);if (n<1000)and(n>99) thenbegin m:=n mod 10; i:=n div 10; k:=i mod 10; i:=i div 10; writeln('k=',k,' m=',m,' i=',i); if m = i then if i = k then writeln('Da'); if m <> i then if i <> k then writeln('Nu'); endelse writeln('Numerele nu sunt de trei cifre');end.
#include <iostream>
using namespace std;
int x, a, b, c;
int main()
{
cin >> x;
c = x % 10;
b = ( x / 10 ) % 10;
a = x / 100;
if(a == b && b == c && c == a) cout << "da";
else cout << "nu";
return 0;
}
using namespace std;
int x, a, b, c;
int main()
{
cin >> x;
c = x % 10;
b = ( x / 10 ) % 10;
a = x / 100;
if(a == b && b == c && c == a) cout << "da";
else cout << "nu";
return 0;
}