Răspuns :
#include <iostream>
using namespace std;
long int x,y;
int contor=0,maxi,aux;
int main()
{
cout << "Introduceti un numar mai mic decat 2.000.000.000: \n";
cin>>x;
if(x>2000000000){
cout<<"Eroare! Ati introdus un numar prea mare!"<<endl;
} else{
y=x;
maxi=0;
repeat:
aux=x%10;
x=x/10;
if(aux>maxi){
maxi=aux;
}
if(x/10>0){goto repeat;}
else {if(x>maxi){
maxi=x;
}
goto pasul2;}
pasul2:
aux=y%10;
y=y/10;
if(aux==maxi){
contor++;
}
if(y/10>0){goto pasul2;
} else {if(y==maxi){
contor++;}
goto afisare;}
afisare:
cout << maxi << " " << contor;
}
return 0;
}