int uc(int n){//ultima cifra
return n % 10;
}
int nrcif(int n){//numarul de cifre
int x = 0;
while(n)x++, n /= 10;
return x;
}
int cifsup(int n){
int c;
do {
c = n % 10;
n /= 10;
}while(n != 0);
return c;
}
int numar_aparitii(char* s, char c){
int nrap = 0;
for(; *s; s++)
if((*s) == c) nrap++;
return nrap;
}