f = f *10 + f; /// f = f * 10 + a;
int a = 2; int n = 5; int result = 0; for(int i=0;i<n;i++){ result += result*10 + a; }