c++ doesn't have a built-in fucntion to find the number of digits in integer While using a array you find it easily by traversing but when you give input as a whole integer it is kinda harder
when i checked on internet(below link) all the solutions are little bit confusing, they're increasing the complexity of programming
https://www.geeksforgeeks.org/program-count-digits-integer-3-different-methods/
so here is my solution!!!