Question: The code below shows the numberofDigits function, which returns the number of digits of a given number (data type long). For example, the number 890786786690656798

 The code below shows the numberofDigits function, which returns the number

The code below shows the numberofDigits function, which returns the number of digits of a given number (data type long). For example, the number 890786786690656798 has 18 number of digits, the function numberofDigits will return the number 18. Every time the function is called, another copy of the parameter passed (Long number) will be created. 2 #include 3 using namespace std 5 int numberOfDigits(long number)t 6 int digit-e; 7while (number) umber number/10 digit++ 10 h 11return digit; 13 14 int main) 16 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!