#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char s[101],*p,cmax=' ',nmax[11];
cin.getline(s,101);
p=strtok(s," ");
while(p)
{
if(p[0]>='0' && p[0]<='9')
if(p[0]>cmax)
{
cmax=p[0];
strcpy(nmax,p);
}
p=strtok(NULL," ");
}
if(cmax==' ') cout<<"nu exista";
else cout<<nmax;
return 0;
}
|