Computer Science, asked by gaganvarshney98, 3 months ago

Q 35. Write a program to input an integer number. check and print whether it is a single-digit integre
double-digit integer or three-digit integer. Print an error message "Out of range" otherwise ?​


rishabh5697: in java or c++

Answers

Answered by apurva79
0

num = int(input("Number: "))

if 0 < len(num) < 4:

print(f"It is a {len(num)} digit number")

else:

print("Out of range")

Similar questions