Write a program to read an integer number and find its


Write a program to read an integer number and find its number of digits ( for example, 3459 has 4 digits and 125860 has 6 digits). The program should be designed in a way that the user could test as many numbers as desired without leaving the program. Use only long integer ( int or long int ) data type in this program; however make sure that the program rejects any input outside the long integer data range ( about -2000000000 to +2000000000). The output of the program should be written to an output file having a format exactly like the following table. VALUE ENTERED NUMBER OF DIGITS 1241 4 19 2 5684900 7 0 1 -153 3 4000000000 Invalid Test the program for at least seven integer values between 2,000,000,000 and a number outside the long int data range. Maximum value for long int is 2147483647.

Solution Preview :

Prepared by a verified Expert
Mathematics: Write a program to read an integer number and find its
Reference No:- TGS01230423

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)