I\'m trying to find a way to find the length of an integer (number of digits) and then place it in an integer array. The assignment also calls for doing this without the use
Most efficient code to find length of a number.. counts zeros as well, note "n" is the number to be given.
#include using namespace std; int main() { int n,len= 0; cin>>n; while(n!=0) { len++; n=n/10; } cout<