Răspuns :
#include <iostream>using namespace std;int maxim,nr;int main(){cout<<"nr=";cin>>nr;while(nr!=0){if(nr%10>maxim)maxim=nr%10;nr=nr/10;}cout<<maxim;return 0;}
#include <iostream>
using namespace std;
int main()
{
int x,a,b,c,maxim;
cin>>x;
a=x/100;
b=x/10%10;
c=x%10;
if(a>b) maxim=a;
else maxim=b;
if(maxim>c) cout<<maxim;
else cout<<c;
}
using namespace std;
int main()
{
int x,a,b,c,maxim;
cin>>x;
a=x/100;
b=x/10%10;
c=x%10;
if(a>b) maxim=a;
else maxim=b;
if(maxim>c) cout<<maxim;
else cout<<c;
}