Hi! I was wondering if there was a more effective way to recognize each digit of a given integer. Given an integer called name, this is what I got.
Ohh and I was wondering if there any good sites to learn recursion. Thanks!!Code:float name, a; name= 4734; int amountRead=0, maxRead=4617, f=1+log10(name),x,y,digits[f], b; a=name; for(int i=0; i< f; i++) { x=1+log10(a); y=a/pow(10, x-1); digits[i]=y; a-=y*pow(10, x-1); cout << "digits= " << digits[i] << endl; }