Counting number of digits in a number

Hey @sp_wizard you are not taking input in your code. Moreover the logic you are using is also not correct to check if a number is Armstrong or not.

But if you only want to count number of digits in a number, then just take input N , by adding cin>>N; at line 5