Write a program that Input an integer between 1&9999 program should display how many integer has
Answers
Answered by
4
The given code is written in Python.
n=int(input('Enter a number: '))
print('Length of',n,'is:',len(str(n)))
- Accept the number.
- Convert the number to string.
- Using len() function, calculate the length of the number and display it.
See the attachment for output.
Attachments:
Similar questions