Cod sursa(job #2739731)
Utilizator | Data | 9 aprilie 2021 20:09:58 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <iostream>
using namespace std;
int x,y,z;
int c,c1,c2;
int main()
{
cin>>x>>y>>z;
int max1,max2,max3;
while(x>0)
{
c=x%10;
if(c>max1)
max1=c;
x/=10;
}
while(y>0)
{
c1=y%10;
if(c1>max2)
max2=c;
y/=10;
}
while(z>0)
{
c2=z%10;
if(c2>max3)
max3=c;
z/=10;
}
cout<<max1<<" "<<max2<<" "<<max3;
return 0;
}