Uite rezolvarea in C++;
Sper sa te ajute!
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin ("comori1.in");
ofstream fout("comori1.out");
int n,v[1000],nn,f,g,i,h,nr,x[1001],ok,n1,n2,n3;
int main()
{
ok=1;
cin >> n;
n1=n%10;
n2=n/10%10;
n3=n/100;
if (n1 == n2 && n2 == n3 && n1 == n3)
cout << "Are toate cifrele egale";
else
cout << "Nu are toate cifrele egale";
return 0;
}